EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: wel on January 19, 2022, 07:14:15 AM



Title: Cascade combo box
Post by: wel on January 19, 2022, 07:14:15 AM
Hi

How I create cascade combobox ? for example selected value in first combobox change values loaded in second one.


Title: Re: Cascade combo box
Post by: squidoz on January 19, 2022, 07:36:42 AM
$('#cc1').combobox({
   onClick: function(record){
      //Change values in other comboboxes
                $('#cc1').combobox('setValue', record.value1);
                $('#cc2').combobox('setValue', record.value2);

               //Load new values in other comboboxes
               $('#cc1').datagrid({url:"yourscript.php?id="+record.id});

                //This can be json, php or set by your javascript code
   }
});

Refer demo
https://jeasyui.com/demo/main/index.php?plugin=ComboBox&theme=material-teal&dir=ltr&pitem=&sort=asc


Title: Re: Cascade combo box
Post by: wel on January 19, 2022, 07:50:45 AM
many thanks squidoz