本文介绍了如何获取数据网格的行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经放置了一个数据网格,并且必须根据数据集的值放置单选按钮.
IE.如果字段"seattype"的值为= 0,则放置带有"x"的标签,如果"seattype"的值非0,则放置一个无线电按钮.
当用户单击特定的单选按钮时,单元格[1]的文本,即.该行的trainno和所选单选按钮的单元格标题值("seattype").
基于此,我必须保留座位.
请帮忙.
I have placed a datagrid and have to place radio buttons based on the dataset values.
ie. If a field ''seattype'' has value=0 then place a label with ''x'' and if ''seattype'' has value other than 0 then place a radiobuton.
When user clicks a particular radiobutton the text of cell[1], ie. trainno of that row and headervalue of cell (the ''seattype'') of the selected radiobutton should taken.
Based on this I have to reserve seats.
Please help.
推荐答案
int noRows=GridView1.Rows.Count;
这篇关于如何获取数据网格的行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!