I believe the 2nd argument to
labelFunction when used in a DataGrid is the columnName. This should be in the
docs somewhere but I couldn’t find it.
From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of msloumac
Sent: Tuesday, May 10, 2005 3:52
AM
To: [email protected]
Subject: [flexcoders]
labelFunction item object and font style
I am using labelFunction in a DataGridColumn to return a string based
on the value of myColumn
I want to set the background property of myColumn
but I dont know how
to get a refrence to the index position of the
item object myColumn. I
have tried numerous variations on item.index
without success, can
anyone help?
function getColumn(item:Object):String
{
if
(item.myColumn=='this') {
myGrid.setPropertiesAt(item.index, {backgroundColor:0xB0BBD2});
return 'Total';
}
else if
(item.myColumn=='that') {
return
item.otherColumn;
}
else
{
return
item.myColumn;
}
}
Yahoo! Groups Links
|