In that case create one another html table with empty row and add in another TR and put condition when data is null then show empty table realted TR else show original TR with gridveiw.
My Tech Blogs MCPD Enterprise and Web Application
MCTS Web, Window and Enterprise Application
Anele
Member
123 Points
125 Posts
Make the Header of a gridview visible when gridview is empty
Aug 31, 2011 08:06 AM|LINK
I want to clear the data in my gridview and still show the EmptyDataText=""
I used this code:
grdAvailableStaff.DataSource =null;
grdAvailableStaff.DataBind();
Now the EmptyDataText="" is visible but the header is not visible while i have ShowHeaderWhenEmpty="True"
What can I do?
himanshu_haj...
Participant
860 Points
151 Posts
Re: Make the Header of a gridview visible when gridview is empty
Aug 31, 2011 08:09 AM|LINK
Following link can help you
http://forums.asp.net/t/960167.aspx/1
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.showheaderwhenempty.aspx
Himanshu Hajariwala
For More Helps Visit : http://himanshu-hajariwala.blogspot.com/
IF IT HELPS YOU THEN KINDLY PRESS THE "ANSWER" BUTTON.
sujithkumar
Contributor
3024 Points
563 Posts
Re: Make the Header of a gridview visible when gridview is empty
Aug 31, 2011 08:28 AM|LINK
Hi,
Refer this link
http://www.aspsnippets.com/Articles/Show-Header-when-GridView-is-Empty.aspx
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.emptydatatemplate.aspx
amitpatel.it
Star
7946 Points
1865 Posts
Re: Make the Header of a gridview visible when gridview is empty
Aug 31, 2011 08:32 AM|LINK
In that case create one another html table with empty row and add in another TR and put condition when data is null then show empty table realted TR else show original TR with gridveiw.
MCPD Enterprise and Web Application
MCTS Web, Window and Enterprise Application
salman beher...
All-Star
30649 Points
5852 Posts
Re: Make the Header of a gridview visible when gridview is empty
Aug 31, 2011 12:04 PM|LINK
Hi,
here..
http://www.aspsnippets.com/Articles/Display-GridView-with-Empty-Message-and-Header-and-Footer-when-no-data-in-ASP.Net.aspx
http://mattberseth.com/blog/2007/07/how_to_show_header_and_footer.html
http://www.codeproject.com/KB/webforms/Fix_empty_GridView_issue.aspx
Thanks...
Sincerely,
Salman
birenpanigra...
Member
2 Points
1 Post
Re: Make the Header of a gridview visible when gridview is empty
Jan 18, 2013 12:19 PM|LINK
Hi
You can visit this site, It is explained properly here.
http://birenpanigrahi.blogspot.in/
http://birenpanigrahi.blogspot.in/2013/01/how-to-display-blank-radgrid-columns.html