PDA

View Full Version : Ext Js Grid Panel dynamic renderer event passed from the Server (Java/.NET)



akshayjoyinfo
20 Mar 2014, 9:34 AM
I am passing a Json object to use in the GridPanel includes store, Columns and Fields. But everything is working except the Icon, when I try to send the renderer also from the server. Once the response reached at the client, rendered is having the double




in the Column model.. Please help to overcome the issue...

This is the sample Json





{
"success":true,
"columns":[{"dataIndex":"Icon",
"header":" ",
"flex":1,
"renderer":"function(value, metaData, record, rowIndex, colIndex, store) {alert(value);metaData.css = value;}"
},
{"dataIndex":"Name",
"header":"Name",
"flex":1}
],
"fields":["Icon","Name"],
"store":[{"Icon":"tree-admin-enterprise","Name":"Enterprise"},{"Icon":"tree-admin-domains","Name":"Domains"}],"errorMsg":""}

Please help me to find the issue...


Current output :- "renderer":"function(value, metaData, record, rowIndex, colIndex, store) {alert(value);metaData.css = value;}"

Expected Output :- "renderer":function(value, metaData, record, rowIndex, colIndex, store) {alert(value);metaData.css = value;}

Please help how can I remove the double quotes before / after the operation.

Gary Schlosberg
21 Mar 2014, 5:43 AM
I'm guessing from your other post that you've gotten this working?
http://www.sencha.com/forum/showthread.php?283093