How to create a Blank row in gridview
In some situations we need to add a blank row between GridView rows. The following program shows how to add a blank row between gridview rows.
In this article I have used Microsoft's Pubs database for sample data. You can download it free from the following link.
How to insert blank row in gridview
In this program we retrieve data from Stor table and group it stor_id wise. When displaying this data in the GridView we insert a Blank Row when a stor_id change. For finding stor_id change, program capture each stor_id in the RowDataBound event.
After capturing stor_id, it evaluate with previous stor_id and check if it is changed or not. If it is a new stor_id then program insert a new row in the RowCreated event. From the following program, you can understand how to insert new row in GridView.
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
- 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
- Checkbox in ASP.NET GridView Control