Hello, i need make severals actions when user click on one of the paging numbers so i'll need to obtain the current paging page number and i have no idea how i could do it. Could anyone help me?. It's almos a dead or alive question.
Thanks and i'm waiting your feedback.
Maybe i don't explain my problem clearly, i mean that i need to know what page index from paging pages user clicked on, because the Paging.PageIndexChanged only has the OldPageIndex value.
I'm looking for it on infragistics documentation but i don't find anything about this. Pleaseee i need help.
Thanks again.
Hello,
You can get access to the current page index like this:
void Paging_PageIndexChanged(object sender, PagingEventArgs e)
{
int oldPageIndex = e.OldPageIndex;
int currentIndexPage =
((WebHierarchicalDataGrid)sender).Behaviors.Paging.PageIndex;
}
Hope this helps.
int currentIndexPage = ((WebHierarchicalDataGrid)sender).Behaviors.Paging.PageIndex;
This line does not work. It throws an error saying -
Cannot cast 'sender' (which has an actual type of 'Infragistics.Web.UI.GridControls.ContainerGrid') to 'Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid' Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid
I have replaced the line with -
int currentIndexPage = ((ContainerGrid)sender).Behaviors.Paging.PageIndex;