0
votes

How to create multi column combo box in Extjs Combo box data like

column 1(First Name) - column 2(Middle name) - column 3(Last Name) == first data combobox row on combo select and all other look like this

-

column 1 - column 2 - column 3 == N no of data

I have 3 fields first name , Middle name and Last Name Want to show in combo box all filed direct from JSON or Combobox store load data in above format

1
Please elaborate by giving some exampleAnkit Chaudhary

1 Answers

2
votes

use combobox's listConfig options

xtype:'combobox',
height: 43,
width: 449,
store: 'searchedStore',
listConfig: {
    loadingText: 'Loading...',
    emptyText: 'No Results.',
    // Custom rendering template for each item
    getInnerTpl: function() {
        return '<table width="100%">'+
             '<tr>'+
                        '<td style="vertical-align:top;width:100%">'+
                        '<div><span style="font-weight:bold;">{name} {middlename} </span><span style="float:right;color:blue">{lastname}</span></div>'+
               '</td>'+
             '</tr>'+
            '</table>';
    }
},