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

[Solved] Grid Pagination rewrites querystrings with multi-valued parameters from &p=v1&p=v2 to &p=v1,v2; MVC loses it

1 Answer 22 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.
Nolan
Top achievements
Rank 1
Nolan asked on 31 Oct 2011, 11:45 PM
Hello,

We're running into problems with the way the Telerik grid reproduces the existing querystring in its sorting & pagination links, and would greatly appreciate some help.

In our application's search results page, for example if the user has selected multiple buildings, they are serialized in the URL as ?BuildingList=10&BuildingList=12... and the controller receives its Model with IEnumberable<int> BuildingList = {10, 12}. Which works great and the world is full of sunshine and puppies.

But then the grid links reproduce that url as ?BuildingList=10%2C12...&page=2, and the default ModelBinder seems to completely fail to understand that, leaving BuildingList = null in the Model, so the controller displays nothing, and the user is left feeling miserable and empty inside.

So, is there a way to either

- tell Telerik Grid not to condense the parameters, or
- make MVC understand that style of parameter (without doing our own parsing of the querystring)

Or are we missing something else entirely?

Thanks tremendously,
Nolan

1 Answer, 1 is accepted

Sort by
0
Julius
Top achievements
Rank 1
answered on 01 Aug 2012, 06:16 PM
Hi - I'm having the same issue. Would be curious of the outcome of this thread (the answer to it).

Thanks,
Julius
Tags
Grid
Asked by
Nolan
Top achievements
Rank 1
Answers by
Julius
Top achievements
Rank 1
Share this question
or