Depending on your data, you might be able to use an IIF statement inline to
indicate whether the checkbox is checked:
<asp:DataGrid id="DataGrid1" runat="server">
<Columns>
<asp:TemplateCo lumn HeaderText="Boo lean Value">
<ItemTemplate >
<asp:CheckBox id=match runat="server" onCheckedChange d="updateStatus "
Checked='<%# DataBinder.Eval (Container, "DataItem.Boole an") %>'
AutoPostBack="T rue">
</asp:CheckBox>
</ItemTemplate>
</asp:TemplateCol umn>
<asp:TemplateCo lumn HeaderText="Boo lean Value">
<ItemTemplate >
<asp:CheckBox id="Checkbox1" runat="server"
onCheckedChange d="updateStatus " Checked='<%# IIF(DataBinder. Eval(Container,
"DataItem.Boole an"),"true","fa lse") %>' AutoPostBack="T rue">
</asp:CheckBox>
</ItemTemplate>
</asp:TemplateCol umn>
<asp:TemplateCo lumn HeaderText="Boo lean Value">
<ItemTemplate >
<asp:Label id="Label1" runat="server"> <%#
IIF(DataBinder. Eval(Container, "DataItem.Boole an"),"Yes","No" )
%></asp:Label>
</ItemTemplate>
</asp:TemplateCol umn>
</Columns>
</asp:DataGrid>
Ken
MVP [ASP.NET]
"Asha" <As**@discussio ns.microsoft.co m> wrote in message
news:7F******** *************** ***********@mic rosoft.com...
greetings,
i'm loading a datagrid and my gird has checkbox, i want these checkboxex
to
be check based on the value from the db? can someone please show me the
code
for it? thanks