Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to show my Header and Footer row when inserting in Gridview

Reply
Thread Tools

How to show my Header and Footer row when inserting in Gridview

 
 
rote
Guest
Posts: n/a
 
      07-14-2008
Hi Guys,
But i noticed if my data source is empty,
the GridView hides my footer (and header) and only display the
EmptyDataText.
How can i solve this.
Thanks in advance


 
Reply With Quote
 
 
 
 
Munna
Guest
Posts: n/a
 
      07-14-2008
Hi,

This is a very bad trick but it works...
first set gridviews... show footer and show header property to
true....

if({my datasource empty})
{
GridViewRow[] x = new GridViewRow[1];
GridView1.EditIndex = 0;
GridView1.DataSource = x;
GridView1.DataBind();
}


Best of luck

------
Munna

www.munna.shatkotha.com/blog
www.munna.shatkotha.com
www.shatkotha.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Error on inserting record from footer of a GridView: mmahal ASP .Net 0 12-12-2009 05:53 AM
Gridview row databound event - can't get past the 1st row of gridview maurban@gmail.com ASP .Net 5 10-13-2006 09:37 PM
Any way to reorder how a datagrid is drawn (header/footer/items vs.header/items/footer)? Henrik ASP .Net Datagrid Control 1 07-06-2006 12:23 AM
GridView nested in DataList - refreshing corresponding DataList row after updating GridView row H5N1 ASP .Net 0 04-26-2006 11:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57