EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: bluesand4 on June 26, 2013, 01:02:01 PM



Title: Combobox with multiple=true in datagrid [solved]
Post by: bluesand4 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


Title: Re: Combobox with multiple=true in datagrid
Post by: stworthy 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


Title: Re: Combobox with multiple=true in datagrid
Post by: bluesand4 on June 27, 2013, 10:35:39 AM
Thanks a lot. It works !