使用单选按钮对表格进行排序 [英] Sorting a table using Radio Button
问题描述
HI Friendz,
在实施此方法时,我面临一些问题.我有一个桌子和桌子旁边的三个单选按钮.单选按钮由表的列名组成.现在检查单选按钮,我必须对表进行相应的排序.
谁能指导我或提供一些示例应用程序来做到这一点
谢谢大家
HI Friendz,
I am facing some problen while implementing this. I have a Table and three radio buttons out side the table. The radio buttons consists of the column names of the table.Now checking the radio buttons i have to sort the table accordingly..
Can anyone guide me or give some sample applications to do this
Thank you all
推荐答案
您应该使用RadioButtonList代替RadioButtons
然后在此列表的selectedindexchanging事件上
重新填充网格
您可以使用dataview进行排序
即
you should use RadioButtonList in place of RadioButtons
then on selectedindexchanging event of this list
Re-Fill Grid
you can use dataview for sorting
i.e.
DataView dv = tblDetail.DefaultView;
dv.Sort = RadioButtonList.SelectedValue; /// this is selected option
GridView.DataSource = dv;
GridView.DataBind();
如果您的问题得到解决,请接受作为解决方案
Accept as solution if your problem got solved
这篇关于使用单选按钮对表格进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!