Setting up the AdvancedDataGrid with dataField and headerText
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
public var myAC:ArrayCollection = new ArrayCollection([
{category:"C1", food:"a"},
{category:"C1", food:"b"},
{category:"C2", food:"c"}]);
</mx:Script>
<mx:AdvancedDataGrid id="adg" width="500" dataProvider="{myAC}">
<mx:columns>
<mx:AdvancedDataGridColumn dataField="category" headerText="Category" width="300" />
<mx:AdvancedDataGridColumn dataField="food" headerText="Food" width="200" />
</mx:columns>
</mx:AdvancedDataGrid>
</mx:Application>
Related examples in the same category