PDA

View Full Version : Dynamic renderer for/in ColumnModel



bullfish
21 Jan 2011, 3:37 AM
Hi,

I am loading a column model dynamically from the server.
The columns are getting set to the grid with cm.setConfig..

The data also includes the renderer of the column as string.
How can I apply this one to the grid?

Thanks for your help..

bulfish

25 Jan 2011, 11:04 AM
So you have methods inline w/the data? That's going to be dangerous moving forward, as eval is used less and less for json decoding.

bullfish
25 Jan 2011, 11:27 AM
Okay..but what can i do else? Should I send an type information (euro, percent, date) and decide which renderer to use on the client side?

25 Jan 2011, 11:35 AM
Okay..but what can i do else? Should I send an type information (euro, percent, date) and decide which renderer to use on the client side?

you can send a key such a 'price' and use someRenderers[key]()