dhtmlxGrid and multiple dhtmlxcombos in header

Hello,

I have a quick question with regard to the dhtmlxGrid. I am using a number of dhtmlxcombo filters in the header of my grid and I am coming into a little bit of a problem that I was wondering if you could help me with.

109.108.139.61/reportmanager/test.php
This is my example that I am working on.

Service, Route and Bus Stop Name.

What I would like to happen is when you select a “Service” from the first column it would filter all the rows by service e.g. “SH_025” and would like to have the a Route drop down only display the “Routes” associated with “SH_025” and when a select a particular route is selected it would only display with bus stops associated with the route but at the moment it is listing all the routes and bus stops.

Is it possible for the dropdown lists to be repopulated once a selection is made on any of the dropdowns?

Any help on this would be appreciated and any code samples would help greatly.

Thanks
Conor.

To do that you may use “onFilterEnd” event. When filtering if finished you can get object of combo filter in header and load it with necessary options:

grid.attachEvent("onFilterEnd",function(){ var combo=grid.getColumnCombo(column_index). combo.clearAll(); combo.loadXML(url_with_new_options); })

Hi,

I am doing something very similar - loading countries then cities. What exactly will the new loadXML URL data with options contain? What do I do with column_index? Is that just the column names that I want filtered?

grid.attachEvent(“onFilterEnd”,function(){
var combo=grid.getColumnCombo(column_index).
combo.clearAll();
combo.loadXML(url_with_new_options);
})

Thanks!

Courtney

What exactly will the new loadXML URL data with options contain?
New xml should contain new options for combo box

What do I do with column_index?
column_index - is zero-based column index

Olga,

Thanks for your answer but its all greek to me as I do not have much experience with coding beyond my basic understanding of changing the samples on the site?

Are there any samples running with this type of filtering possibly?

Thanks!

Courtney

Are there any samples running with this type of filtering possibly?
You can find example here dhtmlx.com/docs/products/dht … combo.html

To get combo object at the grid header you can use following code:

var combo=mygrid.getFilterElement(column_index)

Thanks for your answer but its all greek to me as I do not have much experience with coding beyond my basic understanding of changing the samples on the site?
If you need working example you can open ticket at support.dhtmlx.com/

Olga,

Thank you! I will give it a try!

Sincerely,

Courtney