Saving the settings of Grid on per user basis in the database
New DiscussionHi Team,
I am trying to save the settings (sorting,grouping,filtering,paging, width, column order, column visible) of the Hierarchical Grid on per user basis.
I am creating the grid in the controller using GridModel class and passing the same to the view.
What I understand is I will have to save the individual settings in cookie as below:
document.cookie = “columnSetting=;expires=Thu, 01 Jan 1970 00:00:01 GMT;”;
var persistSorting = $(“#grid11”).igGridSorting(“option”, “columnSettings”);
document.cookie = “sortingsetting” + “=” + persistSorting;
var columnSetting = $(“#grid11”).igGrid(“option”, “columns”);
document.cookie = “columnSetting=” + columnSetting + “;”;
var persistFiltering = $(“#grid11”).igGridFiltering(“option”, “columnSettings”);
document.cookie = “filteringSetting=” + persistFiltering + “;”;
//…..
//…..
Is there any other simpler way using which I can save all these and other settings in the database so that when the user logs in again, I can show a personalized grid to the user.
Also, how to bind these settings again to the Hierarchical Grid so that the Grid has the saved structure and data given that I am creating the grid,features,columns using GridModel class in the controller.
-Regards,
Agraj