dhtmlxGrid

Hi!, im evaluating Grid, when i set a Filter







When i start to write really takes too long filtering data (aprox 200 items only), but when i try this Grid in your 50K examples works very fast including INTERNET…how can this be posible? The PRO source code is different for autofiltering?



Thanks

The filtering on “50K example” made on server side, and grid load only part of data initially so it works relative fast.
The client side filtering process all data and made by javascript which is much slower than server side scripts, so for medium and big datasets it may be slow.

>>onkeyup=“filterBy()”>

Are you using built in filtering functionality or custom one, the oncoming version will have built support of fast filtering, if you need it - please contact us at support@dhtmlx.com - we will send you necessary code and samples.

In case of built in filtering next can be done to improve filtering speed
a) call filterBy not directly but through timeout ( please check original filtering samples ) - it will prevent calling filtering after each keystroke, but will call filtering after pause in typing.
b) you can enable static smart rendering mode ( just add enableSmartRendering command ) - in this mode filtering will be much faster ( actually filtering will take the same time , but rendering of filtered dataset may be much faster )



I’m using the example function on the client side:



 function filterBy()
 {
  var tVal = document.getElementById(“title_flt”).childNodes[0].value.toLowerCase();
  
  alert(mygrid.getRowsNum());
  for( var i=0; i< mygrid.getRowsNum();i++ )
  {
   var tStr = mygrid.cells2(i,0).getValue().toString().toLowerCase();
   if( (tVal=="" || tStr.indexOf(tVal)==0) )
    mygrid.setRowHidden(mygrid.getRowId(i),false);
   else
    mygrid.setRowHidden(mygrid.getRowId(i),true);
  }
 }



I can’t find the timeout example you mention.



And The mygrid.enableSmartRendering (true); generates a Javascript error: “Object don’t accept this property or method”



Regards,



 

I’m using the example function on the client side:

We plan to release new version which supports built in filtering in few days , if you need it ASAP - please contact at support@dhtmlx.com
( new filtering functionality at least few times faster than direct iteration with setRowHidden )