Pratu
Pratu

Reputation: 11

Combo box in ext js

How to render the selected value of combo box in grid of ExtJs?

{
    header: 'value', 
    width: 150,
    dataIndex: 'roleType', 
    editor: {
        xtype: 'combobox',
        store: 'RoleStore',
        valueField: 'roleId',
        displayField: 'roleType',
    }   
} 

Upvotes: 1

Views: 77

Answers (1)

Yasuyuki  Uno
Yasuyuki Uno

Reputation: 2547

If you're using ExtJS5+, you can use the widget column.

{
    xtype: 'widgetcolumn',
    header: 'value', 
    width: 150,
    dataIndex: 'roleType', 
    widget: {
        xtype: 'combobox',
        store: 'RoleStore',
        valueField: 'roleId',
        displayField: 'roleType',
    }
}

Example: https://fiddle.sencha.com/#fiddle/17tv

Upvotes: 1

Related Questions