EasyUI Forum
April 26, 2024, 12:52:58 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: Combobox with multiple=true in datagrid [solved]  (Read 8629 times)
bluesand4
Newbie
*
Posts: 5


View Profile
« on: June 26, 2013, 01:02:01 PM »

Hi,
I am not getting it working fully. After I select the several options I want, and then click on accept, I am losing the selections (or it is not being shown in the row, I don't know). Also, the selections look like this: ,cat1, cat2. From where is this comma at the beginning coming?
I need to select several categories, and show their names after the selecting process. JSON data received is simple:
[{"id":1, "name":"cat1"}, {"id":2, "name":"cat2"}]
Code:
<th data-options="field:'Drw_cat_id',width:120,
                formatter:function(value,row,index){
                    return value;
                  }
                },
                editor:{
                    type:'combobox',
                    options: {
                        multiple:true,
                        valueField:'name',
                        textField:'name',
                        url:'/drawer_categories/'
                    }
                }
            ">Drw Category</th>

Thanks
« Last Edit: June 27, 2013, 10:36:00 AM by bluesand4 » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 26, 2013, 06:15:25 PM »

To use the multiple combobox editor in datagrid, please override this editor to support this feature. Here is the topic shows how to achieve it.
http://www.jeasyui.com/forum/index.php?topic=502.0
Logged
bluesand4
Newbie
*
Posts: 5


View Profile
« Reply #2 on: June 27, 2013, 10:35:39 AM »

Thanks a lot. It works !
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!