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.
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;
The sender is actually a ContainerGrid because the paging happens on a grid by grid basis. It doesn't matter whether it is the root level or a child. The sender will not be a WHDG for this event.
I am trying to add a handler when the GridContainer is created. I add the handler but the code is never called. Does anyone know what I'm doing wrong here? I have listed the creation of the handler and the code that should be called below:
I have the following VB .NET code when the ContainerGrid is created:
AddHandler containerGrid.PageIndexChanged, AddressOf Paging_PageIndexChanged
That handler points to this test code that is not reached:
Private Sub Paging_PageIndexChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.GridControls.PagingEventArgs)
Dim test As Integer = 0