Extjs multiselect combo


I have created a combo with values that I get from a table in the database using an id. I need that combo to be multiple selection but when I put in the xtype:'multiselect' it does not show me any value.

xtype : 'multiselect',
    fieldLabel: this.i18n.fieldSintomas,
    hiddenName  : 'fovaPsicoSintomas',
    displayField: 'valoNombre',
    valueField  : 'valoId',
    typeAhead: true,        
    forceSelection: true,
    titleCollapse: true,
    triggerAction: 'all',               
      store: new Ext.data.JsonStore({
        url : ctx + '/valores.do',
            autoLoad : false,
            remoteSort : false,
                baseParams : {
                    op : 'listByEntidad',
                        entiId : 97
                        sortInfo : {
                            field : "valoNombre",
                            direction : "ASC"
                        fields : ['valoId', 'valoNombre']               

With the parameter entiId what I do is get the values of the table that contain that Id to be able to show them in my combo.

asked by Yuuup 12.04.2017 в 13:26

2 answers


It is not enough to change the xtype to "multiselect", you must also import the code (JavaScript and CSS) of the MultiSelects so that it works:

answered by 12.04.2017 / 15:49

I recommend this multiselect of bootstrap. Is very good. link I recommend inserting the options with jquery in the onload of the document or in the response of the ajax. You just have to read a little the documentation of the api to add / remove the items and refresh the combo. I hope it is useful for you. Greetings.

answered by 12.04.2017 в 14:55