EasyUI Forum
May 08, 2024, 03:57:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Cascade combo box  (Read 2008 times)
wel
Newbie
*
Posts: 30


View Profile Email
« 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.
Logged
squidoz
Newbie
*
Posts: 10


View Profile Email
« Reply #1 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
« Last Edit: January 19, 2022, 07:39:00 AM by squidoz » Logged
wel
Newbie
*
Posts: 30


View Profile Email
« Reply #2 on: January 19, 2022, 07:50:45 AM »

many thanks squidoz
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!