Solved! Go to Solution.
Lefteris,
Sure if you do not make any of those functions specific to the template tab or datagrid. So if you rollover event use the function event like event.target as DataGrid instead of hard coding the datagrid to a specific id. You can have all your tab using the same couple of functions.
Lefteris,
I was able to dynamically create tabs that contain DataGrids. These grids contain the results of a IndentifyTask for each visible layer in a map. As each tab was added, an event listener was added for such events as ListEvent.ITEM_CLICK, ListEvent.ITEM_ROLL_OUT, etc. These listeners pointed to the same functions so that when the user did something like click on a row in a grid, it would highlight the feature on the map for that individual layer.
I put the code in a thread in GIS.StackExhange here. Unfortunately, the link to the working example is no longer valid, since the project was ported over to JavaScript.
<?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="410" height="240"> </mx:Canvas>