This is a migrated thread and some comments may be shown as answers.
Persist Sort Order of Grid
0 Answers 24 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Uchitha
Top achievements
Rank 1
Uchitha asked on 15 Sep 2011, 08:06 AM
Hi Guys,

I'm trying to implement persistence of grid sort order across requests and need some help.

My grid is server data bound. Curretly I use 'orderBy' as a action method parameter to get the sort order of the grid and store it in my Session data handler.

My problem is how to effectively use this saved 'orderby' string to reinstate sort order when my Grid performs a server side data bind subsequently.
e.g : When user revisits the grid after browsing in other pages.

Currently I use following Html Helpers of Telerk Grid to initialize the sort order of grid at server;
  .Sortable(sorting => sorting
                            .SortMode(GridSortMode.MultipleColumn)
                            .OrderBy(sortOrder => order.Id))

My initial idea is to use the 'orderby' search string to forumulate a Linq Expression that can be used by Html Helper method for Grid Sorting. 

Could any one please share their thoughts / experiences around this?

Uchitha.


     








Tags
Grid
Asked by
Uchitha
Top achievements
Rank 1
Share this question
or