How do I load a filtered dhtmlxGrid?


I have a dhtmlxgrid with a column (7) containing data with number format.


… function mypersonfilter(index) { MyGrid.filterBy(7,index); };[/i]

  1. How can I perform a filter during the initial load?
    Now even if I put filterby, I upload the entire grid.
    There is an event type as soon as afterload the grid …

  2. when I run the function in dhtmlxGrid find other values ​​as filter if I’ll get 2 12 20 21 22 …


Try putting the filter statement as a function of load: … bject_load


MyGrid.load("fornitor.php",  function(){ MyGrid.filterBy(7,'2'); }   );

This way the filerBy is executed as soon as the rows are loaded.

Thank you, a very good solution but

it shows me all the records that contain the number 2 as the 12, 20,21,22,23,24,25,26, etc…

Please, try to use

mygrid.load("fornitor.php", function(){ mygrid.filterBy(7,function(data){ return data.toString()=="2"; }) });