.DeleteRow is a class selector and must be assigned via the styleName property, which you can't really do because in a DataGrid a styleName must point to the DataGridColumn.
I think all you want to do is embed the icon to a class: [Embed(source="../assets/cut.png')] public var mark:Class; and then do: consistPersonnel1Delete.setStyle( "icon", mark); ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Thursday, December 27, 2007 7:24 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Icon for Button My style is set in the main application: <mx:Style> .DeleteRow { icon:Embed(source='../assets/cut.png'); } </mx:Style> I thought setting up style will show my image for every button in the column. Alex Harui <[EMAIL PROTECTED]> wrote: And how are you using that style? ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mark goldin Sent: Thursday, December 27, 2007 6:48 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Icon for Button I am using this code: var consistPersonnel1Delete:AdvancedDataGridColumn = Personnel1Grid.columns[3]; consistPersonnel1Delete.setStyle( "image", "DeleteRow"); Still have no image. Alex Harui <[EMAIL PROTECTED]> wrote: The styleName for all renderers is the column it belongs to. ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Thursday, December 27, 2007 8:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Icon for Button I want to have a button in one of columns in the DataGrid. This button will delete rows on its click. I am adding th! e button to dataGrid as a itemRenderer. I am extending class Button: public class deleteRowGrid extends Button { public function deleteRowGrid() { super(); styleName = "DeleteRow"; } } I am using styleName to set an icon for the button. "DeleteRow" style is declared in the main application. When I run my code I have ! a button in the column but with no icon. Any idea why? Thanks