Click here to Skip to main content
15,030,781 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a gridview that dynamically binded from database.
first column of gridview is a checkbox.
I want that just this column be editable and can check and uncheck it.
How can I do it?

1 solution


Take a look into the below code

<asp:GridView ID="gvmails" runat="server" AutoGenerateColumns="false">
               <asp:TemplateField HeaderText="Select">
                       <asp:CheckBox ID="chkSelect" runat="server" />
               <asp:TemplateField HeaderText="Column 1">
                       <asp:Label ID="lblColumn1" runat="server" Text='<%# Eval("Column1") %>'></asp:Label>
               <asp:TemplateField HeaderText="Column 2">
                       <asp:Label ID="lblColumn2" runat="server" Text='<%# Eval("Column2") %>'></asp:Label>


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900