Select to view content in your preferred language

How to show all the search results and fields in Search Widget?

836
1
06-07-2011 07:23 AM
LeiZhou
Deactivated User
I need to create a data table in search widget to show all the fields of search result, e.g., a list or DataGrid. 

When I tried to use the searchResultAC which is an ArrayCollection, it seems it has the following fields: content, geometry, graphic, link, point, symbol and title.  But I need to output the data into my datagrid, so that I can show all the fields in my datagrid. 

<mx:DataGrid dataProvider="{searchResultAC}">
  <mx:columns >
  <mx:DataGridColumn headerText="Name" dataField="content" width="300"/>
  </mx:columns>
 </mx:DataGrid>


But right now, if I set the ???show up??? fields from SearchWidget_Louisville.mxml, all the fields go to content as a whole part.  How do I separate them and show them in my datagrid? Thanks a lot!
Tags (2)
0 Kudos
1 Reply
LeiZhou
Deactivated User
I did some research: searchResultAC called the method createSearchResults() in the widget, but this is a big function, I was wondering how I can read all the fields out from it? Thanks!


I need to create a data table in search widget to show all the fields of search result, e.g., a list or DataGrid. 

When I tried to use the searchResultAC which is an ArrayCollection, it seems it has the following fields: content, geometry, graphic, link, point, symbol and title.  But I need to output the data into my datagrid, so that I can show all the fields in my datagrid. 

<mx:DataGrid dataProvider="{searchResultAC}">
  <mx:columns >
  <mx:DataGridColumn headerText="Name" dataField="content" width="300"/>
  </mx:columns>
 </mx:DataGrid>


But right now, if I set the �??show up�?� fields from SearchWidget_Louisville.mxml, all the fields go to content as a whole part.  How do I separate them and show them in my datagrid? Thanks a lot!
0 Kudos