I have this in grid settings:
var gridLayoutRepository = new GridLayoutRepository();
settings.ClientLayout = (s, e) =>
{
Debug.Write(e.LayoutData);
if (e.LayoutMode == ClientLayoutMode.Loading)
{
e.LayoutData = gridLayoutRepository.Load();
}
else
{
gridLayoutRepository.Save(e.LayoutData);
}
};
I want to have one button for saving gridstate in database and one button for resetting it. Can you help me?
This is possible this way. In grid settings must save grid state:
Then on button click you should save grid state like this:
In Controller:
When you are loading grid you should load grid state from database and write it in Session[“myGridState”]