Note that there are some explanatory texts on larger screens.

plurals
  1. POItemclick event in datagrid
    primarykey
    data
    text
    <p>The problem can be summarized as when clicking an item in datagrid, the text area shows the value of the item, but here the compoents are separate and hence events need to be dispatched.</p> <pre><code>My mxml component file : &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:DataGrid xmlns:mx="http://www.adobe.com/2006/mxml" itemClick="itemClickEvent(event);" creationComplete="init()"&gt; &lt;mx:Metadata&gt; [Event(name="IdSelected", type="one.IdEvent")] &lt;/mx:Metadata&gt; &lt;mx:Script&gt; &lt;![CDATA[ import genericReport.*; import crewUtilization.*; import utils.*; import studies.*; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.events.ListEvent; private function itemClickEvent(event:ListEvent):void { var _study:Object=event.currentTarget.selectedItem.study; dispatchEvent(new IDEvent(_ID)); } ]]&gt; &lt;/mx:Script&gt; &lt;mx:columns&gt; &lt;mx:DataGridColumn dataField="name" /&gt; &lt;mx:DataGridColumn dataField="userId" /&gt; &lt;/mx:columns&gt; &lt;/mx:DataGrid&gt; </code></pre> <p>///////////////////////////////////////////////////////////////</p> <p>This is my Main MXML Application file :</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:custom="*"&gt; &lt;mx:TitleWindow label="Scenario Creation" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:ns1="ccCreation.*"&gt; &lt;mx:Label text="CC CREATION" width="100%" /&gt; &lt;mx:VBox width="100 %" styleName="scenariovboxStyle"&gt; &lt;custom:studySelector id="dg" /&gt; &lt;/mx:VBox&gt; &lt;/mx:TitleWindow&gt; &lt;/mx:Application&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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