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

Grid is sorting for me?

1 Answer 24 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.
Patrick Barranis
Top achievements
Rank 1
Patrick Barranis asked on 05 Feb 2010, 02:56 PM
Hello.  I'm using the MVC Grid on my page, and I just realized that when I call .Sortable() on the grid, the grid appears to be trying to sort my data for me rather than expecting my code to sort it in the controller before binding the grid to the data.  I'm actualy converting a WebForms app to an MVC app, and my WebForms RadGrid didn't do this, and I can't figure out how to turn it off.

I'm using LINQ to SQL, but my data must undergo some transformation before it's "presentable", so I have to sort the data myself before giving it to the grid.  How do I disable this built-in sorting and instead just rely on the "orderBy" parameter being passed to my controller and sort it myself?  Note, of course, I'm not trying to turn of sorting from the user's perspective - I'm trying to turn off the "intelligence" in the grid that's trying to re-sort my data when I call "Render".

Thanks,
Patrick

1 Answer, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 05 Feb 2010, 03:05 PM
Hello Patrick Barranis,

You should use custom binding then. You can check this online example for additional info. This is the corresponding help topic.

Regards,
Atanas Korchev
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Grid
Asked by
Patrick Barranis
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or