PDA

View Full Version : Mapping multiple values from a datastore into a single grid column



smerny
28 Sep 2011, 6:42 AM
I have a grid column header "Pricing" and within that column each row will have a checkbox for pricing. I want it so when I check the box, there are two lines underneath it:
Price: [input]
Cost: [input]

How can I map multiple values from the data store to a single column?

jay@moduscreate.com
29 Sep 2011, 10:32 AM
Yes. You can do that with a custom renderer. The renderer (See Ext.grid.column.Column API) gets passed the instance of your model (Record). You can use that to generate your HTML.