We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Accessing the CurrentPageIndex and PagingSize in Javascript and C#

Hi, I need urgently to know, in JavaScript and C#, what is the size of the paging feature, and what is the current selected index.

When I use the GridWeb1_PageIndexChanged in C#, the CurrentPageIndex is still in the last page selected, not in the new one.

There is a way to know this values both in Javascript and C#? I will use in client and server code.

Thanks,

Hi,

Which version are you using? I test the PageIndexChanged event and I get the correct CurrentPageIndex property. There is not a direct way to get the pageindex from client side api. But you may add the page index to the grid as a custom attribute:

GridWeb1.Attributes["currentpage"] = GridWeb1.CurrentPageIndex.ToString();

and access the attribute from BLOCKED SCRIPT

...

var page = GridWeb1.currentpage;

...