args.StartIndex = 0

VS2012, ASPX, VB.Net

If the user is viewing page 9 and then clicks a column header to perform a sort on that column, I handle the data sorting and display the first page of data, but I want the grid to highlight page 1, not highlight page 9 still on the page selector at the bottom of the grid.

I have tried to use "args.StartIndex = 0" in the controller when creating the grid, but it does not work. Any ideas ?

 

thanks

John


1 Reply

ES Eswari S Syncfusion Team November 8, 2012 06:02 AM UTC

Hi John,

Thank you for using Syncfusion products.

We can achieve your requirement by changing the currentpageno in OnActionSuccess event. Please refer to the following code snippets:

function Success(sender, args) {
    if (args.RequestType == "sorting") {
        sender._pager._currentPageNo = 1;
        sender.sendRefreshRequest();
    }
}

For  your convenience , we have prepared the sample and the same can be downloaded from the following link:

http://www.syncfusion.com/downloads/Support/DirectTrac/94067/Filter163331802.zip

Please try this and let us know if you have any queries.

Regards,
Eswari S


Loader.
Up arrow icon