G
Guest
Hi,
How do you set the checked property for checkbox column in a datagrid? The
SimpleYn is a bit column value in the database. When I try it, I'm getting a
cast error. Thanks.
<asp:TemplateColumn HeaderText="Sample">
<ItemTemplate>
<asp:CheckBox ID="Sample"
Checked='<%# DataBinder.Eval(Container.DataItem, "SampleYn")%>'
runat="server" />
</ItemTemplate>
</asp:TemplateColumn>
How do you set the checked property for checkbox column in a datagrid? The
SimpleYn is a bit column value in the database. When I try it, I'm getting a
cast error. Thanks.
<asp:TemplateColumn HeaderText="Sample">
<ItemTemplate>
<asp:CheckBox ID="Sample"
Checked='<%# DataBinder.Eval(Container.DataItem, "SampleYn")%>'
runat="server" />
</ItemTemplate>
</asp:TemplateColumn>