View Full Version : ExtJs GridPanel Icon is rendered too many times

20 Mar 2014, 9:26 PM
I am using ext js 4.0.7 version, When I try to load the store to GridPanel extjs. I am binding the Store,Columns , Fileds from the Server. I am sending server response in the JSON format. But Once Icon rendered it rendering too many times in the particular cell.

My Json object for the Columns, Store, Fields as shown below. Why this renderer event invoke so many times. How to achive the same functionality.

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

21 Mar 2014, 5:22 AM
This is most likely your css error. Try using "background-repeat: none;" on your icon style.

Gary Schlosberg
21 Mar 2014, 5:42 AM
Wondering if this is because the renderer is somehow improperly running multiple times because the renderer is coming from the data. Can you post more complete code so others can test? Are you able to try it with ExtJS 4.2.1?