Gridview - set footer text

Discussion in 'ASP .Net' started by Mel, Jun 25, 2008.

  1. Mel

    Mel Guest

    How do I set the footer text for a GridView that has AllowPaging set
    to True? I can only get the footer to appear on the first page but I
    really want the same text to appear in the footer of all pages, how do
    I do that?

    Example Code:
    Protected Sub Get_Data()
    adsQuotes.SelectCommand = "SELECT [Quote #] FROM [Quotes] WHERE
    ([Quote Price] > 0)" 'access data source
    adsQuotes.DataBind()
    gvQuotes.DataBind() 'Gridview (50 rows per page)

    'show total records and total price in the footer
    gvQuotes.FooterRow.Cells(0).Text = "Totals: " & lngTotalRecs 'the
    footer only appears on the first page, why?
    gvQuotes.FooterRow.Cells(1).Text = Format(dblTotalPrice, "$#,##0.00")
    End Sub
     
    Mel, Jun 25, 2008
    #1
    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. ad
    Replies:
    0
    Views:
    449
  2. Replies:
    0
    Views:
    2,559
  3. Henrik
    Replies:
    1
    Views:
    448
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
  4. PerlFAQ Server
    Replies:
    0
    Views:
    90
    PerlFAQ Server
    Jan 3, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    75
    PerlFAQ Server
    Mar 7, 2011
Loading...

Share This Page