Click here to Skip to main content
15,896,500 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
how To show gridview one row when no data is available to display. Then fill first row enter, display another row in asp.net
Posted
Comments
Kees van Spelde 1-Jan-14 2:16am    
What do you want to show in this first row? You could for example make a dummy datasource put some fake data in there and bind that one to the gridview. This way it will show you one row.

It would be better to just say there is no data to display.

Quote:
Then fill first row enter, display another row in asp.net


You can use EmptyDataTemplate inside the Gridview. Also , can customize to add rows into it.

Refer the below link which deals with the same.

http://www.shibashishdotnetocean.com/2012/02/using-aspnet-gridview-emptydatatemplate.html#.UsPTKNIW3g8[^]

Hope this helps...
 
Share this answer
 
1st create a datatable manually and set gridview data source to data table with empty data table.Then bind datagridview.
 
Share this answer
 
use empty data template
follow the small example about it..

http://asp-net-example.blogspot.in/2009/12/listview-emptydatatemplate-how-to-use.html[^]
 
Share this answer
 

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