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.

insert a blank row in gridview


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 (C) 2021    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About