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

[Solved] Pager URLs

1 Answer 21 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.
Missing User
Missing User asked on 26 Feb 2010, 05:18 PM
How does the grid contruct the urls for the pager (when using server binding)?
I have the grid loading on a "/basic/productsearch" path but when I click another page in the pager it tries to go to a URL like "product?Products-page=2". Shouldn't that be "product/basicsearch?Products-page=2" instead? This way the automatic paging does not work for me. In fact even the URL I gave as example doesn't work because it is being picked by the same route as for "/product/basicsearch" which simply displays the search form. How are the paging, sorting and filtering parameters in the URL being used by the telerik grid to retrieve the correct data? Which action in the controller should such an operation (paging, sorting, filtering) call upon?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 01 Mar 2010, 07:54 AM
Hello Gabriel,

The grid is using the current action and controller when generating the paging urls. This was supposed to work as expected and at least does in some cases. Thus the problem you are having is not the normal behavior and I am afraid you may have discovered a bug. Could you please provide more details about your scenario? What routes do you have defined? What action method renders the view which contains the grid?
As a quick workaround you can use the ServerBinding method to specify the controller and action you want:

Grid().ServerBinding(server => server.Action("Action", "Controller"))

In any case I would appreciate some details so I can reproduce this problem locally and find out what causes it.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Missing User
Answers by
Atanas Korchev
Telerik team
Share this question
or