Why can I not get the RadGrid Page Index

1 posts, 0 answers
  1. Perry
    Perry avatar
    62 posts
    Member since:
    Jul 2015

    Posted 07 Nov 2018 Link to this post

    I have a Parent Child Radgrid set up and need to store the page index to handle the actions of a returning to the page after a redirect.

    I am trying this code in the Item Command area:

    if (e.CommandName == RadGrid.PageCommandName)
                    GridPagerItem item = e.Item as GridPagerItem;
                    GridTableView view = item.Parent.Parent.NamingContainer as GridTableView;
                    if (view.Name == "child")
                        string message = string.Format("Details table page index changed, current page index : {0}", view.CurrentPageIndex.ToString());
                        string message1 = string.Format("Parent RadGrid page index changed, current page index : {0}", RadGrid1.MasterTableView.CurrentPageIndex.ToString());

     Every time I change my page the results remain at page index = 0.  How can I get this to store the correct page index?

Back to Top