Good morning, I am modifying an old project in flex 3 and I need to create an AdvancedDataGrid as shown in the image example:
Ineedtoindividuallyaddtheiconsinthefirstcolumn.IhaveanarraywiththeinformationofwhichiconsIhavetoadd.Atthispointmytablelookslikethis:
wheretheletters"C" "W" "R" "A" "F" represent the respective icon. I think the easiest way is to make a render that runs through the string and replaces each letter with its icon image. The best I got was this:
<mx:AdvancedDataGrid id="myADG" dataProvider = "{gridData}" width="200" height="500" x="800" y="50" >
<mx:columns>
<mx:AdvancedDataGridColumn id="lineColumn" dataField="line">
<mx:itemRenderer>
<mx:Component>
<mx:Image source='{ iconData.line == 'C' ?
'resources/icon2312.png' : 'resources/icon2314.png'}' x="200" y="200" visible="true" />
</mx:Component>
</mx:itemRenderer>
</mx:AdvancedDataGridColumn>
</mx:columns>
</mx:AdvancedDataGrid>
This method allows you to draw an icon in the column, but only one, I do not know how to add multiple icons on the same line. Will I have to create a column for each icon? Or is there an easier alternative? The examples I find in google are almost all in flex 4 that I can not apply here