Hello Flex Coders,

 

I am trying to extend the Datagrid column so that I can set a custom property ‘iconName’ which will refer to an icon that I would like to appear in each row.  Here is how I would like to use it, and below that is my error message – it appears I can’t extend DataGridColumn.  Any help would be greatly appreciated.  I would like to make the iconName available to my cell renderer without polluting my DataProvider.

 

Thanks for any help,

Allen

 

            <mx:DataGrid width="100%" height="100%" id="dgMessages" dataProvider="{messageList}">

                <mx:columns>

                    <mx:Array>

                        <components:IconDataGridColumn iconName="s_icon_mail" headerText="" width="30" cellRenderer="IconCellRenderer" sortable="false"/>

                    </mx:Array>

                </mx:columns>

            </mx:DataGrid>

 

IconDataGridColumn.as

 

IconDataGridColumn

      extends mx.controls.gridclasses.DataGridColumn

{

 

      public var iconName:String;

 

}

 

 

Error - ActionScript 2.0 class scripts may only define class or interface constructs.

 

 



--
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





--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.269 / Virus Database: 267.8.13 - Release Date: 12/07/2005

Reply via email to