-1

How to show the Empty Grid view in asp .net .... it possible then please tell me how?.

thanks in advance


Bala..

Votes + Comments
You have to use suitable title for your question.
3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by reach_yousuf
0

As far as i know you cant, if there is no data it will not show, if i may ask why do you want to show an empty Gridview ?

0

How to show the Empty Grid view in asp .net .... it possible then please tell me how?.

thanks in advance


Bala..

I assume your purpose that you wanted to show header and footer of gridview even if there is no row.

if (dtFunding.Rows.Count != 0) {     grdFunding.DataSource = dtFunding;     
grdFunding.DataBind(); } 
else {   //Other wise add a emtpy "New Row" to the datatable and then hide it after binding.       
dtFunding.Rows.Add(dtFunding.NewRow());      grdFunding.DataSource = dtFunding;      
grdFunding.DataBind();      
grdFunding.Rows[0].Visible = false; }

Specs: Just add empty datarow to dataset/datatable then bind it to gridview

Mark as solved if it helps you!!!!

Edited by reach_yousuf: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.