Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jorge Arzuaga on Oct 10, 2008 08:56
open dhtmlx forum
Help with initializing Grouping

Hi.. i can`t show 3 combos initializing Grouping, only show the first combo, i need show the 3 combos if have a default value... how do it that?.. Thanks..! The code is next:

<script type="text/javascript">    
var ComboObj_barrio_id=new dhtmlXCombo("barrio_id","barrio_id","296", true, 2);

ComboObj_barrio_id.enableFilteringMode(true);
ComboObj_barrio_id.setComboValue(1);
ComboObj_barrio_id.setComboText("uNO");
ComboObj_barrio_id.filterSelf();

var ComboObj_comuna=new dhtmlXCombo("comuna","comuna","296", true, 2);
ComboObj_comuna.enableFilteringMode(true);
ComboObj_comuna.attachChildCombo(ComboObj_barrio_id,"../../js/php/complete1.php?", showbarrio_id() );
                                                        
var ComboObj_comuna=new dhtmlXCombo("comuna","comuna","296", true, 2);

ComboObj_comuna.enableFilteringMode(true);
ComboObj_comuna.attachChildCombo(ComboObj_barrio_id,"../../js/php/complete1.php");
ComboObj_comuna.setComboValue(1);
ComboObj_comuna.setComboText("1");
ComboObj_comuna.filterSelf();
                                                            

var ComboObj_municipio_id=new dhtmlXCombo("municipio_id","municipio_id","296", true, 2);
ComboObj_municipio_id.attachChildCombo(ComboObj_comuna,"../../js/php/complete1.php", showcomuna() );
ComboObj_municipio_id.enableFilteringMode(true,"../../js/php/complete2.php");
ComboObj_municipio_id.setComboValue(1);
ComboObj_municipio_id.setComboText("MEDELLIN - ANTIOQUIA");
ComboObj_municipio_id.filterSelf();
    
function showbarrio_id(){

ComboObj_barrio_id.setComboValue(1);
ComboObj_barrio_id.setComboText("uNO");    
ComboObj_barrio_id.filterSelf();

}

function showcomuna(){

ComboObj_comuna.setComboValue(1);
ComboObj_comuna.setComboText("1");
ComboObj_comuna.filterSelf();

}


</script>
Answer posted by Support on Oct 13, 2008 03:18
You can add next lines to the end of init

ComboObj_comuna.showSubCombo(true)

This command will force related combo showing.