H
Hendri Irawan
hi all, please help me
I want to use check box in data grid for boolean value, let said about an
invoice record paid status. I've used TemplateColumn for this purpose.
<asp:datagrid id="dgrInvoices" runat=server>
<asp:TemplateColumn><asp:checkbox id="chkPaid"
runat="server"></asp:checkbox></asp:TemplateColumn>
<asp:BoundColumn>..........<<several bound column>>
</asp:datagrid>
has i done it right ?
now, if an invoice record paid status is true i want the checkbox to be
checked. i've try this
in the datagrid event ItemCreated (is this the right event or the
ItemDataBound ?), if put
//real C# code
//make a reference
CheckBox chkToUpdate = (CheckBox)e.Item.Cells[0].FindControl("chkPaid");
//pseudocode
if ..... <<check the paid status>>
then .......
i keep getting "Specified cast is invalid" error.
please help,
Hendri Irawan
I want to use check box in data grid for boolean value, let said about an
invoice record paid status. I've used TemplateColumn for this purpose.
<asp:datagrid id="dgrInvoices" runat=server>
<asp:TemplateColumn><asp:checkbox id="chkPaid"
runat="server"></asp:checkbox></asp:TemplateColumn>
<asp:BoundColumn>..........<<several bound column>>
</asp:datagrid>
has i done it right ?
now, if an invoice record paid status is true i want the checkbox to be
checked. i've try this
in the datagrid event ItemCreated (is this the right event or the
ItemDataBound ?), if put
//real C# code
//make a reference
CheckBox chkToUpdate = (CheckBox)e.Item.Cells[0].FindControl("chkPaid");
//pseudocode
if ..... <<check the paid status>>
then .......
i keep getting "Specified cast is invalid" error.
please help,
Hendri Irawan