Introduction
While fetching data from SQL tables to a webpage, adding data source to the
GridView comes foremost. The next big thing is to provide an interface to the
user so that data can be accessed, updated, removed in lesser clicks.
The lesser the process is hectic, more user friendly our interface becomes.
Moving forward, deleting multiple rows with a single button click is the first
step.
I prefer doing it by adding several lines during the declaration of GridView
design.
Adding a checkbox
A textbox is needed before displaying every row from the table.
<asp:GridView ID="GridView1" runat="server" DataKeyNames="empid" DataSourceID="SqlDataSource1">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chk" runat="server" onclick="Check_Click(this)" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="empid" HeaderText="empid" InsertVisible="False" ReadOnly="True"
SortExpression="empid" />
<asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
<asp:BoundField DataField="password" HeaderText="password" SortExpression="password" />
<asp:BoundField DataField="city" HeaderText="city" SortExpression="city" />

Shashank SrivastavaPosted Sep 24, 2013, 11:44 PM
thank you sir, its really encouraging
Former memberPosted Sep 24, 2013, 6:56 AM
nice blog