views:

18

answers:

1
<asp:GridView ID="GridView3" runat="server" Width="100%"
         DataSourceID="SDS"AllowPaging="True"
         AutoGenerateColumns="False" 
         >
<Columns>
<asp:BoundField DataField="Hint"
         HeaderText="text"SortExpression="Hint"
         />
<asp:BoundField DataField="Visi"
         HeaderText="bool val"
         SortExpression="Visi"
         />
</Columns>
</asp:GridView>

How to make "bool val" Field as a checkbox and editable without making 1st field (Hint) editable.

And how to insert method to update my database on check / uncheck this checkbox

SDS is SqlDataSource with stored procedure on select command.

thank you.

+1  A: 

Convert both of them to a template field. Edit both edit template to make the hint read only (or a label) and the checkbox have auto-postback.

It should call the RowEditing function when you click on the checkbox while in edit mode. So put you're update code in there.

Moox