ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Save Grid settings to display them later
Title:
B
I
{code}
?
I'm working on a project which ask me to create a custom Grid (with grouping, hide/show column... functionalities) but it also ask me to save the settings of your custom grid to get it back later on. Then I was wondering if there is a way to *get the settings of an Awesome Grid* so you can *save it in a data base* and also *apply them on an other Grid* ?
Save Changes
Cancel
Skyd06
asked at 06 Jun 2019
Answers
B
I
{code}
?
I think you need grid columns state, and you can get it by calling $('#Grid1').data('o').columns and you can set/modify them, and after call load, example: $('#Grid1').data('o').columns[0].W = 200; $('#Grid1').data('api').load(); you can also set `.Load(false)` on the grid and call `api.load` in js manually to load it so you can modify the settings before the initial load. grid settings are usually changed on `aweload` event and using ColumnsSelector mod (that show/hides columns) also on `awerender` you should also consider that grid settings in the markup might change over time, perhaps new columns added or removed, you might need to do some checks before loading the settings
Save Changes
Cancel
Omu
answered at 06 Jun 2019
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK