Checkbox in ASP.NET GridView Control
The main advantages of the GridView control over other data-bound controls is its ability to automatically take advantage of data source capabilities. Also the GridView Control provides programmers ability to use any type of Web control in its columns using TemplateField.
Inserting a checkbox in gridview header template and check or uncheck all rows is a common requirement in most of the asp.net programs. In this lesson you will know how to use the CheckBox inside Gridivew control and how to select the multiple checkboxes and to get the selected CheckBoxes value will be displayed. Using this method you can Delete Multiple Rows In GridView In Asp.Net Using Checkbox.
Selecting multiple checkboxes inside a GridView control
In this article I have used Microsoft's Pubs database for sample data. You can download it free from the following link.
Using Checkbox in ASP.NET GridView Control
You can insert a CheckBox control inside a GridView by using TemplateField.
How to fire an event in a checkbox inside a GridView
Here we placed a Button control for fire and event to retrieve the selected rows values from GridView to a Label on a Button Click event. From the following program you can learn how to fire an event and retrieve the selected values from GridView Control.
C# Source Code
VB.Net Source Code
- ASP.NET Simple GridView
- Sorting , Paging and AutoGenerateColumns
- ASP.NET GridView Editing
- ASP.NET GridView Delete
- DropDownList in GridView
- Create Gridview at runtime
- Gridview - Add, Edit and delete
- Gridview export to Excel
- Gridview export to CSV
- GridView summary on Footer
- Subtotal row in Gridview
- SubTotal and GrandTotal in GridView
- Create Gridview without database
- GridView from Stored Procedure
- How to create Gridview Popup Form
- How to create a Blank row in gridview
- Nested GridView in ASP.NET
- Freeze Gridview Header row, Scroll in GridView
- Auto Generate Row Number in GridView
- Image between GridView rows
- How to select a row in gridview