This is a migrated thread and some comments may be shown as answers.

Why can I not get the RadGrid Page Index

0 Answers 19 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Perry
Top achievements
Rank 1
Perry asked on 07 Nov 2018, 07:37 PM

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());
                    RadAjaxManager1.Alert(message);
 
                }
                else
                {
                    string message1 = string.Format("Parent RadGrid page index changed, current page index : {0}", RadGrid1.MasterTableView.CurrentPageIndex.ToString());
                    RadAjaxManager1.Alert(message1);
                }
 
                //************
            }

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

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Perry
Top achievements
Rank 1
Share this question
or