Select to view content in your preferred language

Add to Selection option for Query task

784
4
05-17-2010 09:18 AM
by Anonymous User
Not applicable
Original User: tgorrie

Is it possible for me to "add to selection" for the query task?

Thanks.
0 Kudos
4 Replies
by Anonymous User
Not applicable
Original User: SharpGIS

Could you define what you mean by this? Query task is not a selection tool. It's meant for querying data on the server.
0 Kudos
by Anonymous User
Not applicable
Original User: tgorrie

I am using the spatial query sample to bind a QueryTask result to a datagrid (see below). I would like to add to or combine the query results instead of clearing it each time.

Thank you.

' Bind data grid to query results
Dim resultFeaturesBinding As New Binding(("LastResult.Features"))
resultFeaturesBinding.Source = QueryTask
0 Kudos
DominiqueBroux
Esri Frequent Contributor
In this case, you can no more take advantage of the existing collection 'QueryTask.LastResults.Features'.

You have to manage yourself a collection of graphics.
When you get the result of a query, depending on your need, you can append/replace/combine/clear the collection.
0 Kudos
by Anonymous User
Not applicable
Original User: bcales

tgorrie - did you get this working - if so, would you mind sharing code.
0 Kudos