Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
Grid Resizing with Virtualization
posted

Hello -

I have found that it is not possible to dynamically set the width of an igGrid when Virtualization is set to True.

I need to reset the Width of the Grid when the Window is re-sized.

Destroying and recreating the Grid is not an option for me as it will require a lot of Data Usage, and it just isn't right to have to reload the Grid every time its size is changed.

Here is a code sample that sets up my Grid:

var width = $('#gridDiv').width();

$('#gridScheduling').igHierarchicalGrid({

odata: true,

dataSource: clientDS,
initialDataBindDepth: 0,
width: width,
height: '500px',
virtualization:true,
virtualizationMode: 'continuous',

...

...

};

Any thoughts, comments or work around would be greatly appreciated.

Thank You,

Dominick Ciccone

Parents
  • 49378
    posted

    Hello Dominick,

    Unfortunately in this scenario it is not possible to change the grid's width without destroying and reinitializing as having the width of the grid (and columns) set in pixels is mandatory when using virtualization. The calculations done to estimate how the rows will be virtualized make it necessary for their width to remain constant. Therefore if virtualization is necessary destroying and recreating the grid is the only option in this case. You may be interested in considering to use paging in this scenario.

    http://help.infragistics.com/Help/Doc/jQuery/2014.1/CLR4.0/html/igGrid_Enabling_and_Configuring_Virtualization.html

    Hope this helps. Please do not hesitate to contact me with any questions or updates.

Reply Children