I need to capture the current width columns of the igGrid (resizing enabled) and set them back to the grid on some action after some time. The grids have virtualization enabled and are have continuous mode.
We are using 2013.2 version of ignite ui controls.
Please suggest the right of capturing and setting the widths of columns programmatically.
Kiran Kumar L
In order to capture columns width you can clone the current grid column configuration using $("#selector").igGrid("option", "columns"); code. Then you can use it to re-create the grid when you need to restore the columns widths. Keep in mind that re-creating the grid will reset its scroll position or an alternative approach is cycle through the columns collection and use the igGridResizing.resize API to set the column's width individually at run-time.
Hope this helps,Martin PavlovInfragistics, Inc.
Hello Kiran Kumar,
Please let us know if you have any further questions regarding this matter.
We tried the steps suggested by you, and works fine when the width is specified in pixel.
But in our application we have the grid where the column width is specified in percent and found its not working as expected.
, 0, columnWidth);
The resize method works with arguments in pixels. This is clearly stated in our API docs. What you can do is to manually convert the new column width from percents to pixels and then use the resize method. We will evaluate whether we can improve this API to work directly with arguments in percents.
Hi,When I am, setting the new columns with $("#selector").igGrid("option", "columns"); code, I am getting an error, The remote request to retrieve data failed: ( abort ) always. Please help me what is the reason for it.?