actionscript 3 - Change BackgroundColor of particular row dynamic in DataGrid in flex -
i trying change mx datagridcolumn
background color depend on it's data dynamically didn't get/found solution that.
<mx:datagrid id="orderdg" dataprovider="{orderslist}" > <mx:columns> <mx:datagridcolumn width="30" headertext="number" datafield="no" /> <mx:datagridcolumn width="250" headertext="fname" datafield="fname"> <mx:datagridcolumn width="250" headertext="lname" datafield="lname"> </mx:columns> </mx:datagrid>
now, suppose want make row color green if fname=abc
, color red if fname=xyz
.
how can change background , text color of row.
edit:
i try creating custom renderer following way.
override protected function updatedisplaylist(unscaledwidth:number, unscaledheight:number):void { super.updatedisplaylist(unscaledwidth, unscaledheight); setstyle("color", match_color ); }
but change color of 1 cell not whole row.
Comments
Post a Comment