Select to view content in your preferred language

2 dataProviders for 1 DataGrid?

1303
2
02-18-2011 11:54 AM
JustinRiggs
Emerging Contributor
Hi everyone,

Here's my situation.

I have two FindTasks on two separate services, but I'd like the results to display in one DataGrid. Is there any way to set the dataProvider so that it accepts 2 values? I tried a comma delimited list like so:

dataProvider="{findTask.executeLastResult}, {findTask2.executeLastResult}"

but that didn't seem to work.

BTW, I know that each FindTask works, because I developed them in separate MXML Applications before trying to squash them together.

Thanks for all the help...

Justin
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Justin,

   You are going to have to get away from using the executeLastResult and start parsing the results your self so that you can merge both results into one array collection to act as the dataprovider for the grid.

Start with this sample:

http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=FindTask
0 Kudos
psingh
by
Deactivated User
Can someone guide me towards a sample on how I can call multiple findtask urls?  I have two findtask defined in the application and the second one is not getting called.

    <esri:FindTask
        id="findTask1"
        url="http://gisapptest01.pop.portptld.com/ArcGIS/rest/services/Public_Safety_and_Security/PDX_CardReaders..."
        executeComplete="executeCardReaders(event)"
        />
    <esri:FindTask
     id="findTask2"
     url="http://gisapptest01.pop.portptld.com/ArcGIS/rest/services/Public_Safety_and_Security/PDX_CCTV/MapSer...'}"
     executeComplete="executeCameras(event)"
     />
0 Kudos