jQuery UI Widgets › Forums › Grid › autoresize grid after data is loaded
Tagged: #jqwidgets-grid, autoresizecolumns, fluid size, grid, javascript grid, jquery grid
This topic contains 2 replies, has 2 voices, and was last updated by mimo 5 years, 3 months ago.
-
Author
-
Hi I want to use autoresize automated after grid and data is loaded but some i just get it working with a setTimeout which is not really a possible workaround.
Second when I autoresize is done i got some space on the right of the table left.
Would be awesome when the rest space on the side is spreaded between all columns, so the table is on max window size and all columns using max space possible.<style> body, html { width: 100%; height: 100; overflow: hidden; padding: 3px; box-sizing: border-box; margin: 0; } </style> <script type="text/javascript"> $(document).ready(function () { var url = "/sample4.xml"; // prepare the data var source = {} // initialize jqxGrid $("#jqxgrid").jqxGrid( { //width and height depends on window size width: '100%', //width: 1000, source: dataAdapter, pageable: false, autoheight: true, sortable: true, altrows: true, enabletooltips: true, editable: true, selectionmode: 'multiplecellsadvanced', theme: "dark", columnsresize: true, columnsautoresize: true, columns: [] }); setTimeout(function(){ $("#jqxgrid").jqxGrid('autoresizecolumns') }, 1000); }); </script>
Hello mimo,
Please share a jsfiddle/codepen example demonstrating the reported issue, so that we may determine what causes it.
Best Regards,
TodorjQWidgets Team
https://www.jqwidgets.comHello Todor,
http://jsfiddle.net/Kumata/nwkbd3ua/4/
as u see after the autoresize we got some space left on the right side of the page.
Also is there a way to trigger the autoresize aufter data is loaded without using the Timeout, which will not work when our data is to big and takes longer to load as the Timeout trigger.Tanks for your help
mimo -
AuthorPosts
You must be logged in to reply to this topic.