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

Discussion in 'ASP .Net' started by rote, Jul 14, 2008.

  1. rote

    rote Guest

    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
    rote, Jul 14, 2008
    #1
    1. Advertising

  2. rote

    Munna Guest

    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
    Munna, Jul 14, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. H5N1
    Replies:
    0
    Views:
    2,716
  2. Replies:
    5
    Views:
    658
  3. mmahal
    Replies:
    0
    Views:
    403
    mmahal
    Dec 12, 2009
  4. Replies:
    6
    Views:
    1,211
    David Thompson
    Dec 14, 2010
  5. Henrik
    Replies:
    1
    Views:
    424
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
Loading...

Share This Page