Categories | Question details Back To List | ||
Sorting Slow Hello, We have the pro version of the suite but I am finding sorting in Grid slow for any grid with more that 100 rows. I have buffering enabled (buffering 100 rows) is this connected? Is there any way to increase the speed. The XML is loaded from an XML Island within the document which in turn is generated by PHP/MySQL query. Many thanks Scott Answer posted by Support on Jan 09, 2008 04:46 >> I have buffering enabled (buffering 100 rows) is this connected? May cause some slowdown on first sorting( before sorting all buffered row parsed and rendered in grid ), but must not affect performance of any next sorting. The sorting itself must not take huge time ( except if you are using some complex custom sorting ) but if grid has big dimensions ( many columns for example ) - the rendering itself may be slow, and because after sorting grid need to be re-rendered - it may cause some slowdown. In common case usage of static SmartRendering may be a solution, but it can't be used in case of XML Island as datasource. If problem still occurs for you - please send any code which recreates problems ( you can send it directly to support@dhtmlx.com ) Answer posted by Scott on Jan 14, 2008 08:00 Hello Re this question - I was wrong in that the data is not loaded from an XML isalnd it is loaded from and XML string. If this does not work can i create an XML file on the fly and then load this? If this is what I need to do are there any examples tutorials or anything pointing me how to do this as I am having problems tryi9ng to do this. Scott Answer posted by Support on Jan 14, 2008 08:10 >> it is loaded from and XML string In case of loading from XML string you can try to use static Smart Rendering mode, it allows fast loading and sorting of big datasets ( sorting available only starting from dhtmlxgrid 1.5 ) http://dhtmlx.com/docs/products/dhtmlxGrid/samples/loading_big_datasets/pro_srnd_static.html >>If this does not work can i create an XML file on the fly and then load this? It possible as well. You need not to save static XML file, instead of it , you can get XML data directly from PHP script. Some samples included in package uses such approach with PHP ( package includes both HTML and PHP files ) http://dhtmlx.com/docs/products/dhtmlxGrid/samples/loading_big_datasets/grid_dyn.html if you are using some different server side platform, please contact us directly at support@dhtmlx.com - we have samples for most common server side languages. Answer posted by Scott on Jan 15, 2008 01:52 Hello Again, So I have smart rendering set up with the following. mygrid.enableSmartRendering(true); This works fine until the number of rows is beyond the number in the default view - then sorting stops working. It gives the error Object doesn't support this property or method. Strangely I don't get this error in Firefox -only in IE7 but in firefox although it sorts the sorting is completely wrong - looks totally random.
Am I missing something basic?
Answer posted by Support on Jan 15, 2008 02:16 If you are using some build of dhtmlxgrid 1.4 - please contact us directly at support@dhtmlx.com - I will provide latest version of dhtmlxgrid_srnd.js which must resolve problem with IE. If problem occurs for you with latest code - please provide full grid initialization code, because I can't reconstruct such error locally. |