1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    25
    Answers
    1
    Vote Rating
    1
    edd82 is on a distinguished road

      0  

    Default Answered: How to change text colour on Ext.List items according to different field values

    Answered: How to change text colour on Ext.List items according to different field values


    I have a Ext.List that is connected to a Store. There is an ID and status field in the model and I want to change the colour of the ID that appears in the LIST according to the value of the status field.

    I can use the "itemTpl" config to include HTML to change the font colour but I don't know how to do this dynamically.

    Can anyone help with this?

  2. Ignore me, I've just found out the power of XTemplate!!!

    For anyone else who hadn't quite followed the documentation correctly:

    itemTpl: new Ext.XTemplate(
    '<tpl if="id &gt; 1">',
    '<font color="red">{id}</font>',
    '</tpl>',
    '<tpl if="id &lt; 1">',
    '<font color="blue">{id}</font>',
    '</tpl>',
    { isOnline:function(){return "offline"}}

  3. #2
    Sencha User
    Join Date
    Nov 2011
    Posts
    25
    Answers
    1
    Vote Rating
    1
    edd82 is on a distinguished road

      0  

    Default


    Ignore me, I've just found out the power of XTemplate!!!

    For anyone else who hadn't quite followed the documentation correctly:

    itemTpl: new Ext.XTemplate(
    '<tpl if="id &gt; 1">',
    '<font color="red">{id}</font>',
    '</tpl>',
    '<tpl if="id &lt; 1">',
    '<font color="blue">{id}</font>',
    '</tpl>',
    { isOnline:function(){return "offline"}}

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi