DataGrid with ViewState disabled

Discussion in 'ASP .Net Web Controls' started by Melvyn, Nov 25, 2003.

  1. Melvyn

    Melvyn Guest

    Hi,

    I am listing the data from a SQLServer database to an aspx
    page using DataGrid.

    I call the binding function on the Page_PreRender event so
    that I dont need to call the binding function everytime
    for Page Index change or Sorting.

    Now when I disable the ViewState, the Paging does not work
    because PageIndexChanged event does not fire.

    Now I need to disable the Viewstate to reduce network
    traffic towards client side and I am binding the grid
    everytime in the Page_PreRender event. But with ViewState
    disabled my Paging does not work, is there any way to work
    around this.

    Any help is appreciated.

    Regards

    Melvyn
     
    Melvyn, Nov 25, 2003
    #1
    1. Advertising

  2. Melvyn

    Guest

    I believe you need to rebind the datagrid in either Page_Init or
    Page_Load because the pageindexchanged event is handled after Page_Load
    and before Page_PreRender.
     
    , Dec 16, 2004
    #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. Ken Varn
    Replies:
    4
    Views:
    470
    Ken Varn
    Nov 9, 2004
  2. Alejandro Penate-Diaz

    if (control.visible == false) viewstate disabled?

    Alejandro Penate-Diaz, Mar 4, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,477
    Alejandro Penate-Diaz
    Mar 4, 2005
  3. Tommy Martin

    Viewstate and disabled checkboxlist control

    Tommy Martin, Aug 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    447
    Tommy Martin
    Aug 12, 2005
  4. PJ6
    Replies:
    2
    Views:
    657
  5. Ryan Liu
    Replies:
    1
    Views:
    832
    bruce barker
    Jul 13, 2009
Loading...

Share This Page