identify results to infoSymbol Datagrid

535
0
07-03-2012 09:43 AM
AllenJones
New Contributor III
I have a identify task set up that identifies the the closest layer in a service (it returns them all but i grab index[0] so i get the first one).  The layer returned is variable depending on where the user clicks on the map.  Nothing out of the ordinary here.... When i use the default 'new infoSymbol()' to display the attributes everything works as planned, the results are transposed from the result.attributes and are displayed vertically in the infoSymbol.  I need to create a custom infoSymbol with a datagrid to display the data vertically and other controls to display data. The problem is, due to the layout of the object, it wants to display the data horizontally not vertically.  I have tried building an array that is formatted properly and setting it as the attributes but i cannot access the the named object index's (object.namedIndex) to transfer them to the array. I have tried the following and it does'nt work using the returned object.

<esri:InfoSymbol containerStyleName="CustomStyle" id="calloutWithGrid">
   <esri:infoRenderer>
    <fx:Component>
     <s:DataRenderer>
      <mx:DataGrid dataProvider="{data}">
       <mx:columns>
        <mx:DataGridColumn headerText="Field Name"  dataField="Name"/>
        <mx:DataGridColumn headerText="Value"  dataField="Value"/>
       </mx:columns>
      </mx:DataGrid>
     </s:DataRenderer>
    </fx:Component>
   </esri:infoRenderer>
  </esri:InfoSymbol>

Granted i am using the result.attributes as the source for the {data} but the problem is i cannot access the attribute index's (result.attributes.columnName) to transfer them to another array that IS accessible.  Keep in mind that the fields that are returned are not static, this infoSymbol definition needs to work no matter which layer is returned .  how do i gain access to the named Object indexe's as text[ATTACH=CONFIG]15723[/ATTACH]
anyone who can point me in the right direction on this will have my gratitude!!
Tags (2)
0 Kudos
0 Replies