Using ExtJs 4.1
Hi, I have a field in my model, where
1 = “Ford”
2 = “GM”
3 = “Honda”
…
How to display the names in the grid, when my store has the numbers?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you look at the docs there is an example of using templatecolumn:
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.column.Template
Basically a template column has access to the record during its rendering. If your record has both the numerical names and descriptive you can print both out to display them (just like in the example).
If your record has no descriptive data then you don’t need a template column. You would use a
rendereron a regular column and pull and return the description from a lookup object that has the numeric to descriptive labels map. Like thisreturn lookup[value];Read the docs please for usage of renederer.