PDA

View Full Version : Grid filter list with visible and value fields



darkhorni
28 Feb 2013, 4:06 AM
This is the code form the documentation



var filters = Ext.create('Ext.ux.grid.GridFilters', {
...
filters: [{
type: 'list',
dataIndex: 'size',
phpMode: true,
// options will be used as data to implicitly creates an ArrayStore
options: ['extra small', 'small', 'medium', 'large', 'extra large']
}]
});



So, when you click at "medium" it searches for medium. Bu I want to show it as "3" and it will search medium. Same as combobox where there is a visible field and value field. Is it possible to do it for grid filter's list?

scottmartin
28 Feb 2013, 7:18 AM
You might have to modify the UX to use an object so you could use:
options[{text: 'Medium', value: 3},..]