Jump to content

Mobile DBListGrid Custom Template Color Variable ?


andyhill

Recommended Posts

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';
      }
    },
 
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...