EasyUI Forum
November 20, 2017, 11:06:53 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Chain Combobox on Datagrid Filter Row  (Read 1144 times)
xpyro
Newbie
*
Posts: 1


xpyro_tc
View Profile Email
« on: March 17, 2017, 01:09:36 AM »

how can i make a chain combobox on Datagrid Filter Row ? for common sample in datagrid : city | country.
city load database. but after selection on city, combobox on country will displaying only related item from city.
i've read combo-tree sample, but still dont know how to implement it to datagrid filter row with separate column.

Note : I use remote filter row.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3129


View Profile Email
« Reply #1 on: March 17, 2017, 06:09:23 PM »

You can call 'getFilterComponent' method to get the special filter combobox component and reload its data. Please refer to the code below:
Code:
dg.datagrid('enableFilter', [{
    field:'field1',
    type:'combobox',
    options:{
        onChange: function(value){
            var cb2 = dg.datagrid('getFilterComponent', 'field2');
            //...
        }
    }
},{
    field:'field2',
    type:'combobox',
    options:{
        //...
    }
}]);
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!