Hi,
I'm looking for a way to save and restore the width of columns. Some of the users of my software may want to manually size some columns and when they next visit the same page, they expect the columns widths to be the same as they were last time. How would I do this?
BTW, I'm using the ASP.NET MVC wrappers.
Thanks,
Al
there is no out of the box way to achieve this. I am not sure how your application is structured, and how you submit data to the server (whether it's based on AJAX requests or you do a full page submit) - but one possible way could be to retrieve the current column width after resizing, and then serialize some custom JSON and send it to the server , then de-serialize it and apply it to the grid on the next page load.
$("#grid1).igGrid("option", "columns")[<column index>].width
that's how you can retrieve the current column width, at runtime. On resizing, the column object's width property gets changed accordingly.
You can also contact Development Support if you need more in-depth help with this scenario.
Angel
Thanks for the reply, but it doesn't quite work.If you don't resize a column, the value isn't set.i.e.
<resize column 0>
That's not too bad, but it leads to this...If you resize a column and other columns are automatically resized as a result, those other columns don't get have a value set:<resize column 0, columns 1 through n resize as a result>