Q: Checkbox checked inside asp.net GridView I have a asp.net grid view and i have IsActive field in database and it comes as 1  or 0.So i need according to that value Grid view Checkbox is checked or not.
Grid View Field
<asp:TemplateField>
            <ItemTemplate>
                <asp:CheckBox ID="chkIsActive" DataField="ISACTIVE" HeaderText="Is Active"  runat="server" Checked='<%# Eval("ISACTIVE") %>'/>

            </ItemTemplate>
        </asp:TemplateField>

Code Behind
 GridRes gridRes = NewsProxy.GetAllnews(req);
            gv.DataSource = gridRes.Dataset;
            gv.DataBind();


A: If your IsActive field is a bit column and contains only 0 or 1 then you can do like below in order to pre-check or unchech the checkbox.
<asp:CheckBox ID="chkIsActive" DataField="ISACTIVE" HeaderText="Is Active"  runat="server" Checked='<%# Convert.ToBoolean(Eval("ISACTIVE")) %>'/>

