ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
ColumnsSelector does not update after adding columns and breaks the form after removing a column
Title:
B
I
{code}
?
I have chosen to persist selected columns via localStorage. It works great until I try to add or remove columns. The program tries to use localStorage values and either breaks completely if a column was removed or ignores a newly added column. How to solve this ? I am using `.Mod(o => o.ColumnsSelector())` and `Persistence(Persistence.Local).ColumnsPersistence(Persistence.Local)`
Save Changes
Cancel
Tomas
asked at 08 Dec 2016
by "I try to add or remove column" you mean add them from the Column selector or add them from code by modifying the `.Columns`
at 09 Dec 2016
Omu
from code by modifying the .Columns
at 09 Dec 2016
Tomas
read this for solution: http://aspnetawesome.com/learn/mvc/Grid#Persistence
at 09 Dec 2016
Omu
So, the solution you are proposing is using `awe.ppk += "myapp" + 5` which as I understand is equivalent to just clearing localStorage and losing user preferences ?
at 09 Dec 2016
Tomas
yes, this is the current solution
at 09 Dec 2016
Omu
Answers
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