Hi admin, I have problem with ejGrid.
When i perform sorting on document ready (javascript) with my sort settings from serverside (i have saved sort settings state into database and load it),
and then assign the grid's datasource with a data manager (url adaptor), the sort settings state got reset.
How to persist sort column state when assigning the data source (initially null because i want to load the data source after doing some work after page loaded)?
Attached code:
var dataManagerId = xxx; //same as EJ().DataManager's id set on razor page
var sortColList = {//loaded from serverside};
$(function () {
_customerGrid = $('#myCustomerGrid').ejGrid('instance');
_customerGrid.option('sortSettings', sortColList);
_customerGrid.option({ dataSource: dataManagerId }); //after setting datasource, sortSettings getting reset.
//If i set datasource before i set the sortSettings, double ajax request will be sent (want to avoid this)
});