This should be possible via an groupIconFunction
like this:
<mx:AdvancedDataGrid groupIconFunction="getGroupIcon">
<mx:columns>
<mx:AdvancedDataGridColumn headerText="Name" dataField="name"/>
</mx:columns>
</mx:AdvancedDataGrid>
<fx:Script>
[Embed(source='/assets/company.png')]
private static const COMPANY_ICON: Class;
[Embed(source='/assets/customer.png')]
private static const CUSTOMER_ICON: Class;
private function getGroupIcon(item:Object,depth:int):Class
{
if (item is Company)
return COMPANY_ICON;
if (item is Customer)
return CUSTOMER_ICON;
// null = default icon
return null;
}
</fx:Script>
There is also an example in Adobe's Flex online reference which demonstrates how to use the groupIconFunction and groupLabelFunction properties.