Getting info from advanceddatagrid. Please help me.


i know http://forums.adobe.com/thread/131416 has answer inside dont understand means (hierarchy , cursor thingies)  , how use it. manage understand until getting selected index, , got it. dont know how use extract data row , trace out. please me add on doubleclickhandler function. these codes.

 

my xml file.

 

<location locations="singapore">

<locations region="north">
<details l_id="7" l_title="causeway point" street="1 woodlands square, #01-39 causeway point"/>
<details l_id="17" l_title="imm building" street="2 jurong east street 21, #01-51"/>
</locations>

<locations region="west">
<details l_id="4" l_title="arena country club " street="511 upper jurong road, #01-06"/>
<details l_id="19" l_title="jurong point" street=" 63 jurong west central 3  #b1-54/55 jurong point"/>
</locations>
</location>

 

------------------------------------------------------------------------------------------ -------------

my actionscript code in main mxml file

 

private function doubleclickhandler():void
            {  
                var item:object = agd.selecteditem;
                var index:int = agd.selectedindex;
               
                if (!item || index == -1)
                return ;
                alert.show("double clicked item index:" + index);            
            }

 

------------------------------------------------------------------------------------------ ---------------

<mx:advanceddatagrid id="agd"
doubleclickenabled="true" itemdoubleclick="doubleclickhandler()">
        <mx:columns>
            <mx:advanceddatagridcolumn datafield="@locations"
                headertext="location"/>
            <mx:advanceddatagridcolumn datafield="@l_title"
                headertext="title"/>
            <mx:advanceddatagridcolumn datafield="@l_street"
                headertext="street"/>
        </mx:columns>
    </mx:advanceddatagrid>

hi,

you've extract data

var item:object = agd.selecteditem;

it's item dataprovider. have xml dataprovider, it's xml row.



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Installation database is corrupt

Nogen der kender et simpelt hvidt template med topmenu kun - Joomla! Forum - community, help and support

Error compiling for board Arduino/Genuino Uno.