
Originally Posted by
talha06
Let me give you an example of my situation:
If I use converter, I'll loss these key values which I need to use for further actions on grid.
...
Please correct me if there's something wrong.
Only if you covert the key values in place. Instead convert them into a new field:
Code:
fields: {
{ name: 'gender', type: 'int' },
{ name: 'genderText', type: 'string', convert: function (value, record) {
return 1 == record.get ('gender') ? 'male' : 'female';
} }
}
Now you have both the key and the text in the model. Your grid, and wherever else, can use genderText but you still have the number.