如何在ASP.Net中的嵌套GridView中获取RadioButton Checked属性为True. [英] How can i get RadioButton Checked property is True in a nested GridView in ASP.Net.
本文介绍了如何在ASP.Net中的嵌套GridView中获取RadioButton Checked属性为True.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在ASP.Net的嵌套GridView中获取RadioButton Checked属性为True.
(当前,选择RadioButton之后,我将Checked属性值设置为FALSE).
我想获取Selected RadioButtons的TRUE值.
How can i get RadioButton Checked property is True in a Nested GridView in ASP.Net.
(Presently, After selecting RadioButton, i get Checked property value as FALSE).
I want to get Selected RadioButtons TRUE value.
推荐答案
朋友,
在嵌套的Gridview中,您必须使用FindControl方法来查找任何Gridview的控件,例如:假设我们有GridvView1包含嵌套的GridView2,而GridView2包含RadioButton控件,则
hi Friend,
in nested Gridview you have to you use FindControl Method for find the control of any Gridview For Example: Suppose we have GridvView1 Contain nested GridView2 and GridView2 Contain RadioButton Control then
Dim grd As GridView = CType(Gridview1.Rows(0).FindControl("GridViewname"), GridView)
For Each dr As DataGridItem In grd.Rows
Dim rd As RadioButton = CType(dr.FindControl("Radiobuttonname"), RadioButton)
''''rd.Checked use this this method
Next
希望这会有所帮助:)
Hope this will help :)
这篇关于如何在ASP.Net中的嵌套GridView中获取RadioButton Checked属性为True.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文