单选按钮检查更改事件在GridView控件不触发 [英] Radiobutton checked change event not firing in gridview

查看:111
本文介绍了单选按钮检查更改事件在GridView控件不触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个GridView在那里我有一个单选按钮。我需要的是对的单选按钮我必须找到在GridView的datakey的选择。还多了一个问题与那就是我可以选择多个单选按钮,这是不应该的。

I have a gridview where i have a radio button. What i need is to on the selection of the radiobutton i have to find the datakey of the gridview. Also one more issue with that is , i can select more than one radio button, which should not happen.

推荐答案

您需要使用文字控制注入单选按钮标记。
这将处理编组所以只有一个单选按钮被选中。
你不能用标准的无线电控制组做。

You need to use a literal control to inject radio button markup. This will handle grouping so only one radio button is selected. You cannot do it with the standard radio control group.

与工作code一个完整的例子来看看这个:

See this for a complete example with working code:

http://www.asp.net/data-access/tutorials/adding-a-gridview-column-of-radio-buttons-vb

这篇关于单选按钮检查更改事件在GridView控件不触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆