Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>here is your answer</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initialize()"&gt; &lt;mx:Script&gt; &lt;![CDATA[ import mx.collections.HierarchicalData; var a:Array = new Array(); var o:Object = {}; private function initialize():void{ o["text"]="hello"; o["desc"]="Rahul"; a.push(o); } ]]&gt; &lt;/mx:Script&gt; &lt;mx:AdvancedDataGrid width="100%" height="100%" sortExpertMode="true" id="adg1" designViewDataType="tree" dataProvider="{new HierarchicalData(a)}"&gt; &lt;mx:columns&gt; &lt;mx:AdvancedDataGridColumn headerText="text" dataField="text"/&gt; &lt;mx:AdvancedDataGridColumn headerText="desc" dataField="desc"/&gt; &lt;/mx:columns&gt; &lt;/mx:AdvancedDataGrid&gt; &lt;/mx:Application&gt; </code></pre> <p>edit - ok now discard my previous answer according to your data try this</p> <pre><code>var a:Array = new Array(); var o:Object = {}; private function stringArrayToObjectArray():void{ o["id"]="mauj"; var oj:Object=new Object(); oj["title"]="aaa"; o["data"]=oj; var oj1:Object=new Object(); oj1["id"]="mauj2"; var oj2:Object=new Object(); oj2["title"]="qqqq"; oj1["data"]=oj2; a.push(o); a.push(oj1); } private function some_labelFunc(item:Object,th:Object):String { return item.data.title; } ]]&gt; &lt;/mx:Script&gt; &lt;mx:AdvancedDataGrid width="100%" height="100%" sortExpertMode="true" id="adg1" dataProvider="{a}"&gt; &lt;mx:columns&gt; &lt;mx:AdvancedDataGridColumn headerText="COMPANIES" dataField="data" labelFunction="some_labelFunc"/&gt; &lt;/mx:columns&gt; &lt;/mx:AdvancedDataGrid&gt; &lt;/mx:Application&gt; </code></pre> <p>try this sorry for such a bad code</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload