This question is locked. New answers and comments are not allowed.
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.
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.