ASP.net (vb)
I had a checkbox in gridview to select rows for batch update, i want to disable and enable the checkbox base on some conditions.
For example, I had a column called "Status", if the status="Approved", the checkbox of this row will be disable, otherwise the checkbox is enabled to select.
Thanks.
Code:<Columns> <asp:TemplateField> <HeaderTemplate> <asp:CheckBox ID="cbSelectAll" runat="server" Text="" OnClick="selectAll(this)" /> </HeaderTemplate> <ItemTemplate> <asp:CheckBox ID="cb_Select" runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="status" HeaderText="Status" ReadOnly="True" meta:resourcekey="GridView1_status"> <ItemStyle HorizontalAlign="Center" Width="80px"/> </asp:BoundField>


Reply With Quote
Bookmarks