在Gridview中显示复选框列表 [英] Showing Check Box List in Gridview
本文介绍了在Gridview中显示复选框列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我在表Abc中有一个状态列,它存储0和1.
现在,这是我要显示状态为1的已检查状态和状态为0的未检查状态.
请帮帮我.我想使用Radiobutton或CheckBox在gridview中实现它.
谢谢你
Mohd Wasif
Hi All,
I have a column Status in a Table Abc and it stores 0 and 1.
Now the thing is this I want to display checked if status is 1 and un-checked if status is 0.
Please help me .I want to implement it in gridview either by using Radiobutton or CheckBox.
Thanking You
Mohd Wasif
推荐答案
绑定复选框的"Checked"属性.通过此链接: http://forums.asp.net/p/1499377/3543444.aspx [ ^ ]
Bind the "Checked" property of the checkbox. Go through this link: http://forums.asp.net/p/1499377/3543444.aspx[^]
您可以在sqlserver 2005中使用bit数据类型,它将存储true或false值.要将值传递给该字段,您只需要为false传递false(或0),为true传递true(或1).然后您可以在gridview中显示它.
you can use bit datatype in sqlserver 2005 it will store true or false value . For passing value to that field you only have to pass false(or 0) for false and true(or 1) for true. and then you can show it in your gridview.
这篇关于在Gridview中显示复选框列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文