|
See if this itemRenderer helps. This
itemRenderer will turn the background of a row to red if the value of the column
“myColumnName” in that row is over 50. package { import
mx.controls.Label; import
mx.controls.dataGridClasses.*; import
mx.controls.DataGrid; import
flash.display.Graphics; import
mx.styles.StyleManager;
[Style(name="backgroundColor", type="uint",
format="Color", inherit="no")] public class
BackgroundComp extends Label { override protected
function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth,
unscaledHeight); var g:Graphics
= graphics; g.clear(); var
grid1:DataGrid = DataGrid(DataGridListData(listData).owner); if
(grid1.isItemSelected(data) || grid1.isItemHighlighted(data)) return; if (data.myColumnName
> 50) { g.beginFill(0xFF0000); g.drawRect(0,
0, unscaledWidth, unscaledHeight); g.endFill(); } } } } Joan From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf
Of Misael Hi, |
- [flexcoders] datagrid Misael
- RE: [flexcoders] datagrid Joan Tan
- Re: [flexcoders] datagrid Misael

