How to store/retrieve grid model values into/from database
We can retrieve/save Grid settings/model values from or into the SQL Table and apply them to Grid.
HTML
JS
Razor
Controller
Render ejDropDownList to store the different time and two ejButtons for saving and applying the Grid states.
On Clicking the save button, current state of Grid i.e. its model values will be save in the SQL dataSource which in turn saves the respective time in the ejDropDownList.
Based on the ejDropDownList’s value (time), click event of “apply” button will retrieve Grid objects from the StateStore table and apply the changes to the Grid.
Likewise, follow the above steps to apply states for ASP.Net Grid.
The following screenshot show Persistence Grid with the dropdown and buttons for applying the Grid state.
Figure 1: Grid state from the dropdown |
This page will automatically be redirected to the sign-in page in 10 seconds.