G Guest Nov 17, 2004 #1 In grdReport_ItemDataBound event how could I populate the checkbox column according to another hidden column value? Thanks! awan
In grdReport_ItemDataBound event how could I populate the checkbox column according to another hidden column value? Thanks! awan
G Guest Nov 17, 2004 #2 this works for me where raised is either 1 or 0 in the dataset NB you may need to turn off autogenerate columns on the grid <asp:TemplateColumn SortExpression="Raised" HeaderText="Raised"> <ItemStyle HorizontalAlign="Center"></ItemStyle> <ItemTemplate> <asp:CheckBox id="chkRaised" runat="server" Enabled="False" Checked='<%# DataBinder.Eval(Container.DataItem, "raised") %>' > </asp:CheckBox> </ItemTemplate> </asp:TemplateColumn>
this works for me where raised is either 1 or 0 in the dataset NB you may need to turn off autogenerate columns on the grid <asp:TemplateColumn SortExpression="Raised" HeaderText="Raised"> <ItemStyle HorizontalAlign="Center"></ItemStyle> <ItemTemplate> <asp:CheckBox id="chkRaised" runat="server" Enabled="False" Checked='<%# DataBinder.Eval(Container.DataItem, "raised") %>' > </asp:CheckBox> </ItemTemplate> </asp:TemplateColumn>