What is the correct way to combine the (working) code below and the $grid.pqGrid("refreshDataAndView") function?
When using the refreshDataAndView function the column sorting state is not working.
//setter
var CM = $grid.pqGrid("option", "colModel");
var strCM = JSON.stringify(CM);
$.cookie("CM", strCM);
//alert(strCM);
//getter
var strCM2 = $.cookie("CM");
alert(strCM2);
var CM2 = JSON.parse(strCM2);
$grid.pqGrid("option", "colModel", CM2);
$grid.pqGrid("refresh");