In asp.net web page, i am using gridview, in item template i am using check box which is for displaying status. if status is 1 cheked is ture if 0 it is unchecked i write the code like this.
<asp:CheckBox ID="chkone" runat="server" Checked='<%# Eval("status").ToString()=="1"? true :false %>' > </CheckBox>
it will work when “status” is int [datatype, in database], if it is char(2) data type it is not working, can you help me.
Try
I believe char(2) will be padding your number with a space.
I might also mention that
is somewhat redundant and you should just have