BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Xander,
The width and height property specify the width and height for the control and the grid automatically displays horizontal and vertical scroll bars respectively.
If the width is not specified then the grid will be rendered with the scroller, which has default width of 250.
To avoid the scrolling width from using default value, set the width property as 0.
Please refer the code snippet.
$("#Grid").ejGrid({ // the datasource "window.gridData" is referred from jsondata.min.js dataSource: ej.DataManager(window.gridData).executeLocal(ej.Query().take(30)), commonWidth: 200, allowScrolling: true, scrolling: {width:0,height: 300, allowVirtualScrolling: true } . . . . });
|
If the width is set as auto/zero then we need to refresh the grid scroller when the browser is resized.
The scroller can be refreshed using the window resize event as follow.
window.onresize = function () { var gridobj = $('#Grid').data('ejGrid'); gridobj.element.find(".e-gridcontent").ejScroller("refresh"); }
|
Please let us know if you have any queries.
Regards,
Madhu Sudhanan. P