GridView CheckBox Disable
Posted
by
zxc
on Stack Overflow
See other posts from Stack Overflow
or by zxc
Published on 2013-10-28T03:15:22Z
Indexed on
2013/10/28
3:54 UTC
Read the original article
Hit count: 186
I have a gridview populated by checkbox using the code below
Data Source Result:
Branch,101,102,103,104,105,106,107,108,109,110
00001,null,null,null,null,null,null,null,null,null,null
00016,1,1,1,1,1,0,0,0,0,0
00244,1,1,1,1,1,1,1,1,1,1
<asp:TemplateField HeaderText="101">
<ItemTemplate>
<asp:CheckBox runat="server" id="cb101" Checked='<%# Eval("101").ToString().Equals("1") %>' />
</ItemTemplate>
</asp:TemplateField>... and so on
It is properly working for checkbox if if the column is 0 and 1. Now what I need to do is if the column is null the checkbox should be disabled/readonly
© Stack Overflow or respective owner