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

[Solved] ASP.NET MVC Grid Sorting on Template Columns

2 Answers 50 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.
Mohammad
Top achievements
Rank 1
Mohammad asked on 14 Jan 2011, 03:27 PM
I am using the MVC Grid and I have few template columns since I wanted to display the links inside the Grid control. But now the sorting is disabled on the Grid. I think this is because I am not using the bound columns. Is there anyway to get the sorting work on the Template columns?

2 Answers, 1 is accepted

Sort by
0
Mohammad
Top achievements
Rank 1
answered on 14 Jan 2011, 03:36 PM
Hi,

I was able to achieve the behavior by using a Bound column with a template column. when I click first time it sorts asc and then desc and then on 3rd time it just refreshes with the following in the url:

orderBy=~

Also, third time when clicked on column header the up/down arrows are gone!
0
Shreyans
Top achievements
Rank 1
answered on 16 Apr 2012, 03:51 AM
Can you show how were you able to achieve this, example would be greatly appreciated.
Tags
Grid
Asked by
Mohammad
Top achievements
Rank 1
Answers by
Mohammad
Top achievements
Rank 1
Shreyans
Top achievements
Rank 1
Share this question
or