Hi,
Can anyone send me some sample code / point to some sample code to change the background color of a cell in a datagrid when the cell is clicked.
I have tried writing a custom cellRenderer for this but with no luck.
class MyCellRenderer extends UIComponent
{
var listOwner : MovieClip; // the reference we receive to the list
var text_c:MovieClip;
var getCellIndex : Function; // the function we receive from the list
var celltext : mx.controls.Text;
function MyCellRenderer()
{
text_c = createClassObject(Text, "celltext", 1, { styleName:this, owner:this });
}
function setValue(theValue:String, theItem:Object, selected:String):Void
{
trace("in setValue, theValue:" + "selected: "+selected );
text_c.text = theValue;
text_c.visible = true;
listOwner.dataProvider.editField(getCellIndex().columnIndex, "backgroundColor", 0xCC66FF);
}
Thanks in advance,
Shweta
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.