Correct me if im wrong, but shouldnt it be:
 
class IconDataGridColumn extends mx.controls.gridclasses.DataGridColumn
{
 bla bla
 
}
 
?? the big difference being the use of the keyword 'class'
 
Nick Sauro + R O U N D A R C H + bus 212.909.2335 + mob 914.882.3687
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Allen Manning
Sent: Tuesday, July 12, 2005 1:30 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Extending Datagrid Column

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



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



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




Reply via email to