Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Datagrid should be something like this:</p> <pre><code>&lt;mx:DataGrid id="DataGridAnswers" top="10" bottom="10" left="10" right="10" &gt; &lt;mx:columns&gt; &lt;mx:DataGridColumn&gt; &lt;mx:itemRenderer&gt; &lt;fx:Component&gt; &lt;mx:LinkButton label="Посмотреть результат" click="linkbutton1_clickHandler(data.test_id, data.id)"&gt; &lt;fx:Script&gt; &lt;![CDATA[ import etc.NavigationEvent; protected function linkbutton1_clickHandler(testId:int, answerId:int):void { var navEvent:NavigationEvent = new NavigationEvent(NavigationEvent.NAVIGATION_STRING, NavigationEvent.REPORTS_SCREEN, true, true); navEvent.testId = testId; navEvent.answerId = answerId; dispatchEvent(navEvent); } ]]&gt; &lt;/fx:Script&gt; &lt;/mx:LinkButton&gt; &lt;/fx:Component&gt; &lt;/mx:itemRenderer&gt; &lt;/mx:DataGridColumn&gt; &lt;/mx:columns&gt; &lt;/mx:DataGrid&gt; </code></pre> <p>And handle this event in container like this:</p> <pre><code>protected function navigationHandler(event:NavigationEvent):void { // выбрать соответвтующий экран на главном меню mainMenu.selectScreen(event.screen); switch (event.screen) { case NavigationEvent.LOGOUT: ... break; } // Переключить вью стек if (screenDic[event.screen] != null) viewStack_main.selectedChild = screenDic[event.screen]; } </code></pre> <p>plus add eventlistener to container</p> <pre><code>initialize="this.addEventListener(NavigationEvent.NAVIGATION_STRING, navigationHandler)" </code></pre>
 

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