Help with combogroups in scheduler

Hi all,
I have this code for my goal:

         var html="<div class='dhx_cal_ltext'><table><td><div id='c1' style='height:10px;'></div></td><td><div id='c2' style='height:10px;'></div></td><td><div id='c3' style='height:10px;'></div></td><td><div id='c4' style='height:10px;'></div></td></table></div>";
         return html;


      if (!this._node_init){

         node.combo1 = new dhtmlXCombo("c1", "c1", 150);
         node.combo2 = new dhtmlXCombo("c2", "c2", 150);
         node.combo1.attachChildCombo(node.combo2, "php/name.php?parent=$mask");
         node.combo3 = new dhtmlXCombo("c3", "c3", 50);
         node.combo2.attachChildCombo(node.combo3, "php/surname.php?parent=$mask");
         node.combo4 = new dhtmlXCombo("c4", "c4", 150);
         node.combo3.attachChildCombo(node.combo4, "php/types.php?parent=$mask");
         this._node_init = true;

         var a = ev.category = node.combo1.getComboText(); = node.combo2.getComboText();
         ev.surname = node.combo3.getComboText();
         ev.types = node.combo4.getComboText();
            return a;


Lightbox section is:

{name:"category", height:21, type:"combo_select", map_to:"category"},

I have the appropriate fields in “render_table”.
This code work and save in my DB.

The problem is:
If I edit the event without refresh the page it’s Ok, but if refresh the page and edit the event I lost the values in combogroup fields of lightbox “category,name,surmane,types”.

Can you help me ?
Thank You



combo in groups mode doesn’t allow to set default values. In this case it would be better to use onChange event and reload combos manually:

parentCombo.attachEvent("onChange",function(){ /*selected value*/ var value = this.getActualValue(); ... /*reloading child combo*/ childCombo.clearAll(true); childCombo.loadXML(url+"?parent="+value,function(){ childCombo.setComboValue(defaultValue); }); })

For example, the default value for the combo2 is

Thank you Alexandra.
Where I must Insert your suggested code?


this code is just an sample. You may apply this approach to the necessary combos instead of attachChildCombo method.

For example instead of node.combo2 could be parentCombo when node.combo1 is childCombo