Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Amb on Nov 04, 2008 06:24
open dhtmlx forum
TreeGrid Filter behavior

Is there a way to get the following behavior in the TreeGrid: when filtering (from a built-in header filter on one of the columns), automatically expand those nodes with matching rows. At the moment it only finds values if the row is visible already.

Thanks
Answer posted by Support on Nov 04, 2008 06:51
If you are not using dyn. loading, filtering will find row in both opened and closed branches, but it doesn't expand branches automatically. 
You can use something similar to next

grid.attachEvent("onFilterEnd",function(){
  mygrid.expandAll();
  return true;
});
Answer posted by Amb on Nov 04, 2008 07:21
Thanks - is there any way to restore the previous expanded state when filters are removed?
Answer posted by Support on Nov 04, 2008 07:56
You can try to use dhtmlxgrid_ssc.js , it adds saveOpenStates and  loadOpenStates commands