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

[Solved] Getting Current Page in Server Bound Grids

1 Answer 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Darrien
Top achievements
Rank 1
Darrien asked on 01 Mar 2011, 01:35 PM
I have a grid with Page Size set to 15.  If one is on Page 2 and adds a new item, the Controller returns to the Index, but it is on Page 1.  I was hoping to capture the Pager click using a Server Binding GridAction and set the current page number into the Model so I could use the paging => paging.PageTo(Model.CurrentPage) method.  How can I accomplish this?  When I attempted to "pass" in the ActionParameterName [GridAction(ActionParameterName="param")], the Page was always set at 0.

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 01 Mar 2011, 04:05 PM
Hello Darrien,

 You can declare a parameter named "page" of your action method and configure the grid not to prefix the url parameters:

<%= Html.Telerik().Grid().PrefixUrlParameters(false) %>

Regards,
Atanas Korchev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Darrien
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or