ViewState issue for GridView in UpdatePanel

Last post 08-03-2009 3:27 PM by RatheeshC. 1 replies.

Sort Posts:

  • ViewState issue for GridView in UpdatePanel

    08-03-2009, 3:19 PM
    • Member
      649 point Member
    • mezzanine74
    • Member since 10-17-2008, 6:00 AM
    • Moscow - Russia
    • Posts 230

    I have a gridview inside update panel. I use paging on gridview as it has several rows. The imagebutton on the gridview row cause a postback by _RowCommand. Everything is working fine.

    The problem is, after postback, gridview appears with the very first pageindex. How can i preserve current pageindex before ImageButtonclick.

    For UpdatePanel and Gridview, I set EnableViewState as True

    please mark as answer if it helps you
  • Re: ViewState issue for GridView in UpdatePanel

    08-03-2009, 3:27 PM
    Answer
    • Contributor
      5,624 point Contributor
    • RatheeshC
    • Member since 04-25-2008, 2:05 PM
    • Posts 1,198

     Hi,

    Store the Page index in ViewState variable and retrieve that in post back.

    Thanks

    Thanks
    Ratheesh

    Please mark it as answer if it resolves your issue.
Page 1 of 1 (2 items)