jQWidgets Forums
jQuery UI Widgets › Forums › Grid › jqx grid in jqxWindow takes too long to render
This topic contains 2 replies, has 2 voices, and was last updated by atomic 9 years, 4 months ago.
-
Author
-
Hi guys,
I have grid that takes too long to show after button is clicked. My grid is in jqxWindow. It has 5 columns and 8760 rows ant it takes couple minutes after button is clicked to show (in mean time it even puts browser to Not Responding state)
What am I doing wrong?var myURL ='phase2/data/demo full optimistic/TDGcp.json'; var source = { url: myURL, root: '2010', datatype: 'json', cache: false, datafields: [ { name: 'hour' }, { name: 'value' }, { name: 'wind' }, { name: 'solar' }, { name: 'hydro' } ], }; var dataAdapter = new $.jqx.dataAdapter(source); $("#jqxHourlyDataGrid").jqxGrid( { autoheight: true, autorowheight: true, width: '100%', theme: theme, source: dataAdapter, editable: false, selectionmode: 'singlecell', columns: [ { text: "Hours", datafield: 'hour', width: 80, pinned: true }, { text: 'Demand', datafield: 'value', width: 120,cellsalign: 'right', cellsformat: 'd2'}, { text: 'Wind', datafield: 'wind', width: 120,cellsalign: 'right', cellsformat: 'd2'}, { text: 'Solar', datafield: 'solar', width: 120,cellsalign: 'right',cellsformat: 'd2'}, { text: 'Hydro', datafield: 'hydro', width: 120,cellsalign: 'right', cellsformat: 'd2'} ] });
data sample
{ "2000": [ { "hour": "H0", "value": 8169.930613098, "wind": 513.08872821655, "solar": 0, "hydro": 1204.1313904333 }, { "hour": "H1", "value": 8056.1567624631, "wind": 491.47950526387, "solar": 0, "hydro": 1153.4182442478 } ]}
hour
goes to H8760, it means grid has 8760 rows and json contains data for 5 years but I am only showing for 2010 with dataAdaper settingroot: '2010',
Any suggestion?
Thanks a lot
Hi atomic,
You don’t have to find any problems with this amount of data if is not used this combination
autoheight: true, autorowheight: true,
If you want to use it – make the grid pageable with
pageable: true,
Best Regards,
Ivailo IvanovjQWidgets Team
http://www.jqwidgets.comHi Ivailo,
That is true. Now it works great and it was obvious, but it really did not cross my mind.
Thanks a lot!
Best
-
AuthorPosts
You must be logged in to reply to this topic.