titanium - dynamic data for each TableViewRow -


i'm using alloy (markup , models) construct tableview, works perfect

<collection src="spot" /> <window>     <tableview id="spottableview" datacollection="spot">         <tableviewrow title="{name}">             <view class="header-view">                 <label class="title-header" text="{name}"/>                 <label class="desc-header" text="{desc}"/>             </view>             <view class="fixed-view">                 <imageview class="image" image="{logo}"/>                 <view class="info-view">                     <label class="green-label" text="{cost}"/>                     <label text="{minimum}"/>                 </view>             </view>         </tableviewrow>     </tableview> </window> 

but have question: how can modify dynamic data form each tableviewrow? need change colors of labels depending on data brings each model in collection. example, if cost 0 label "cost" green, if cost 100 color of label red. guess must realizarce on controller, not create tableviewrow out of view, because not want miss advantages of data bindings

add field containing color model, , bind label's color it.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -