Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
745
Setting the CurrentPageIndex
posted

Hi,

How do I set the CurrentPageIndex after data has been data bound to the grid?

My scenario is as follows;
A user is on page 3, makes some modifications and hits save. We're doing a some processing,and need to reload the entire sheet.
How do I automatically jump back to page 3 after the updated data is rebound to the grid? Setting the CurrentPageIndex throws an exception.

Is there some kind of event I can subscribe to?

Thanks!

 

Parents
No Data
Reply
  • 40030
    Offline posted

    Hi, 

    So, are you setting the ItemSource to the collection immediately?  Or are you reloading the UserControl in which the XamWebGrid is on?

    If you're just changing the ItemSource, then you should be able to set the CurrentPageIndex immediately. 

    Otherwise, if you're reloading the XamWebGrid Control, you can set the currentPageIndex in the loaded event of the XamWebGrid. 

    -SteveZ

Children