Hi,
I can't seem to get an itemRenderer to work properly with my DataGrid.
I am trying to access the listData object to do some conditionals in
my renderer (eg. show a specific image based on row data). However,
my listData property is not getting set properly. Here's the renderer:
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
implements="mx.controls.listClasses.IDropInListItemRenderer"
width="100%"
horizontalAlign="center" verticalAlign="middle"
preinitialize="initComponent();">
<mx:Image id="theImage" width="13" height="13"/>
<mx:Script>
<![CDATA[
import mx.controls.dataGridClasses.DataGridListData;
import mx.controls.listClasses.BaseListData;
[Embed(source="/assets/images/arrow_down.png")]
[Bindable]
public var downArrow:Class;
[Bindable]
private var tmpSource:Class;
private function initComponent():void
{
addEventListener("dataChange", handleDataChanged);
}
public function handleDataChanged(event:Event):void
{
trace("listData = " + DataGridListData(listData));
theImage.source = downArrow;
}
//Importing interface IDropInListItemRenderer requirements
private var _listData:BaseListData;
public function get listData():BaseListData
{
return _listData;
}
public function set listData(value:BaseListData):void
{
_listData = value;
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
}
]]>
</mx:Script>
</mx:HBox>
I'm just calling this as itemRenderer="custom.display.MyItemRenderer"
from a datagrid column...
Any help is appreciated.
Thanks,
Brendan
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
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.
__,_._,___
- [flexcoders] DataGrid itemRenderer listData is null Brendan Meutzner
- Re: [flexcoders] DataGrid itemRenderer listData is n... Brendan Meutzner
Reply via email to
Sorry... nevermind... issues with my dataProvider being set dynamically.
On 6/12/06, Brendan Meutzner <[EMAIL PROTECTED]
> wrote:

