andyhill Posted May 3, 2018 Share Posted May 3, 2018 I am trying to have custom colors on custom template - please advise - thanks. config.itemTpl = new Ext.XTemplate ( { '<table class="gridCustom">'+ '<tr>'+ '<td width="269px" style="color: var({[this.getColor(values)]}); text-align:left; height:80%">{[this.getStreet(values)]}</td>'+ '<td width="60px" style="text-align:left; height:80%">{[this.getNAH(values)]}</td>'+ '</tr>'+ '</table>', { getColor: function(values) { if(values[3] == 1) return 'blue'; else return 'black'; } }, 1 Link to comment Share on other sites More sharing options...
andyhill Posted May 3, 2018 Author Share Posted May 3, 2018 Solved Link to comment Share on other sites More sharing options...
Tokay Posted May 4, 2018 Share Posted May 4, 2018 Please share solution, it could be usefull for others, thank you. Link to comment Share on other sites More sharing options...
andyhill Posted May 6, 2018 Author Share Posted May 6, 2018 color: {[this.getColor(values)]}; 1 Link to comment Share on other sites More sharing options...
Recommended Posts