views:

173

answers:

1

I am using a sqldatasource for filling one GridView and on page loading or before taking any action, there is no data (default value=null) and normally the datagrid is empty (using emptydatatext="no records found etc etc...").. Issue is I can not see the header of that grid in empty case, but only the emptydatatext!

I have tried to use some code of the references below, but no success, because I'm not using DataTable control as a DataSource, but directly filling the gridview from sqldatasource! useless references:

http://mattberseth.com/blog/2007/07/how_to_show_header_and_footer.html

http://blogs.claritycon.com/blogs/kevin_marshall/archive/2006/02/28/247.aspx

http://www.codenewsgroups.net/group/microsoft.public.dotnet.framework.aspnet.webcontrols/topic14389.aspx

http://www.codeproject.com/KB/aspnet/Fix_empty_GridView_issue.aspx

P.S. I'm not usign DataTable as a DataSource, but sqldatasource (from the Data Controls), and I want to show header, when sqldatasource is null or empty ?!

A: 

Have you tried the answer to this question? It looks like a similar problem to your own.

adrianos
I have tried this problem, and unfortunately is not a similar problem, because my issue is related to header, how to show the header of this gridview in empty status, which gridview is using sqldatasource, not DataTable...Anyway, Thank you for answering!
gaponte69