Paging doesn't work if columns built up in code?

Discussion in 'ASP .Net Datagrid Control' started by Bernard O'Flynn, Oct 23, 2003.

  1. Hi
    I am building my bound columns in code. I have attached an event listener
    for the paged event.
    However when I click on the next page link the event doesn't fire and the
    page refreshes without the datagrid even there!
    If I build up the bound columns on the aspx page everything works fine.

    Can someone please tell me how to do this in code?

    Thanks in advance
    Bernard
     
    Bernard O'Flynn, Oct 23, 2003
    #1
    1. Advertising

  2. Bernard O'Flynn

    Tim Weaver Guest

    If you haven't figured this out yet take a look at the
    following article.

    http://authors.aspalliance.com/JimRoss/Articles/DatagridDi
    et.aspx

    It discusses how to handle a postback w/o viewstate, but
    the topic also applies to your issue.


    >-----Original Message-----
    >Hi
    >I am building my bound columns in code. I have attached

    an event listener
    >for the paged event.
    >However when I click on the next page link the event

    doesn't fire and the
    >page refreshes without the datagrid even there!
    >If I build up the bound columns on the aspx page

    everything works fine.
    >
    >Can someone please tell me how to do this in code?
    >
    >Thanks in advance
    >Bernard
    >
    >
    >.
    >
     
    Tim Weaver, Nov 5, 2003
    #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. Paul Perot
    Replies:
    0
    Views:
    384
    Paul Perot
    Dec 12, 2003
  2. =?Utf-8?B?UGF0cmljay5PLklnZQ==?=

    DataSet paging vs Datareader paging

    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    10,703
    Scott Allen
    Oct 8, 2004
  3. Carlos Albert

    Gridview and paging doesn't work

    Carlos Albert, Feb 14, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    10,942
    Carlos Albert
    Feb 14, 2006
  4. Replies:
    4
    Views:
    939
  5. Bernard O'Flynn

    Paging doesn't work if datagrid is built in code behind

    Bernard O'Flynn, Oct 29, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    116
    Bernard O'Flynn
    Oct 29, 2003
Loading...

Share This Page