最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
RadioButtonList在Datagrid模板列中的应用
时间:2022-06-30 10:38:21 编辑:袖梨 来源:一聚教程网
1.RadioButtonList插入DataGrid模板列的方法与其他控件插入的方法一致。
2.从数据库中读取RadioButtonList状态的方法
1) .aspx文件
2) .vb文件
objDataSet.Tables(0).Columns.Add(“strRBL“)
objDataSet.Tables(0).Rows(x).Item(“strRBL“)=n
3.RadioButtonList状态改变后读取的方法
1).aspx文件
2).vb文件
Public Sub RBL_WA_SelectedIndexChanged(ByVal Sender As Object, ByVal e As System.EventArgs)
Dim srcRBL As RadioButtonList = CType(Sender, RadioButtonList)
Dim srcCell As TableCell = CType(srcRBL.Parent, TableCell)
Dim srcRow As TableRow = CType(srcCell.Parent, TableRow)
End Sub
srcRBL即为状态改变的RadioButtonList,可用SelectedIndex/SelectedValue获取相应值
srcRow即位状态改变的RadioButtonList所在的DataGrid行,可用srcRow.Cells(n).Text获取相应的主键值将RadioButtonList状态写入数据库
2.从数据库中读取RadioButtonList状态的方法
1) .aspx文件
2) .vb文件
objDataSet.Tables(0).Columns.Add(“strRBL“)
objDataSet.Tables(0).Rows(x).Item(“strRBL“)=n
3.RadioButtonList状态改变后读取的方法
1).aspx文件
Public Sub RBL_WA_SelectedIndexChanged(ByVal Sender As Object, ByVal e As System.EventArgs)
Dim srcRBL As RadioButtonList = CType(Sender, RadioButtonList)
Dim srcCell As TableCell = CType(srcRBL.Parent, TableCell)
Dim srcRow As TableRow = CType(srcCell.Parent, TableRow)
End Sub
srcRBL即为状态改变的RadioButtonList,可用SelectedIndex/SelectedValue获取相应值
srcRow即位状态改变的RadioButtonList所在的DataGrid行,可用srcRow.Cells(n).Text获取相应的主键值将RadioButtonList状态写入数据库
相关文章
- 《石器时代:觉醒》医生职业怎样 06-16
- 热门全球交易所虚拟币交易APP TOP10-最新币圈交易所币安交易所推荐 06-16
- 《晶核》晶珀获取条件说明 06-16
- SNORT币怎么操作?2025OKX交易所新手投资 06-16
- 《超时空跑跑》张公主技能表现如何 06-16
- 法国兴业银行旗下FORGE将在以太坊和Solana上推出新型稳定币USD CoinVertible 06-16