I have a Gridpanel where a column is set as combobox ... I load ID as the valueField and then in renderer I search the store with the ID and display the corresponding name as the displayField Like this -
view.renderer = function(value) {
var store = view.getEditor().getStore(),
record;
if (value && store) {
record = store.findRecord(view.valueField, value, 0, false, false, true);
if (record) {
return record.get(view.displayField);
}
}
return value;
};
When I click on sort Ascending/Sort Descending this column gets sorted by ID(valueField) .. I want it to get sorted by Name(displayField)