Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ez on Feb 26, 2009 01:09
open dhtmlx forum
Grid with subGrid - problem with sorting

Hi!

I have 2 grids: master and subgrid joined by

masterGrid.setSubGrid(subgrid,1,3);

Column 1 in sub grid contains key and column 3 has labels inside.

In master grid I have filter #text_filter in header but filtering works on keys instead of displayed labels.

My question is: how can I fiter grid type column by labels?
Answer posted by dhxSupport on Feb 26, 2009 02:40

Add following code to the main grid initialization:

mygrid.attachEvent("onFilterStart",function(){

  this.setColTypes("dyn,ro,ro,price,ch,co,ra,ro");
  return true;
  })
  mygrid.attachEvent("onFilterEnd",function(){
  this.setColTypes("dyn,grid,ro,price,ch,co,ra,ro");
  return true;
  })
Answer posted by ez on Feb 26, 2009 03:01
I guess the same will fix sorting (but other event)?

Would You change default behavior in next realase?
Answer posted by dhxSupport on Feb 26, 2009 03:34
We will try to fix it as soon as possible
Answer posted by ez on Mar 11, 2009 04:07
Suggested fix will not fix #select_filter filter type.

Is there any way to use #select_filter filter in this cases?
Answer posted by Support on Mar 11, 2009 07:23
By using above code it possible to intercept and affect any filtering call, including #select_filter
But in case of #select_filter the custom logic need to be added to list of options building, which is not covered by above code. 

Unfortunately that functionality can't be extended through event, can be done only by code modification.