Select to view content in your preferred language

ZOOM TO QUERY RESULTS

2117
4
03-28-2011 01:28 AM
vipulsoni
Regular Contributor
Hi,

I need help for a query task which zooms to the results from the datagrid selection changed event.

In the given sample
http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#QueryWithoutMap
If I click on the grid results the map should zoom/highlight to correct features.
.


Like in the find task sample > http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Find.

After  (through query task)  several attempts (all failed) I was not able to get the attributes filled in a datagrid , though I get a datagrid filled with rows (row count seems to be correct) but with empty records..white spaces

Please help as I dont know what I am doing wrong in my code.
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
I was not able to get the attributes filled in a datagrid


How is set the ItemsSource property of your datagrid?
Hw are set the columns?
0 Kudos
vipulsoni
Regular Contributor
How is set the ItemsSource property of your datagrid?
Hw are set the columns?


Thank you for the reply!

<slData:DataGridTextColumn Binding="{Binding Attributes[test]}" Header="test" />
                    <slData:DataGridTextColumn Binding="{Binding Attributes[name]}" Header="Name"/>
                    <slData:DataGridTextColumn Binding="{Binding Attributes[bld_id]}" Header="Bld_ID" />
                    <slData:DataGridTextColumn Binding="{Binding Attributes[Remark]}" Header="Remark"/>

I tried the above code for binding with the exact names as the attribute column names...but did not help..

in CS file -
FindDetailsDataGrid.ItemsSource = args.FeatureSet;

so i guess the binding of the datagrid was correct but what I wanted to know is that how in findtask sample on the datagrid selection changed event the map zooms to results ..same functionality I wanted to show with query task , so that I have my datagrid populated with some more fields other than the primary field thus helping the user to decide which feature he wants to select.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Did you look at this sample : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SpatialQuery ?

The result of the query task is displayed in a datagrid, and when a row is selected, the feature is selected in the map.
Is it what you want to do?
0 Kudos
vipulsoni
Regular Contributor
Did you look at this sample : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SpatialQuery ?

The result of the query task is displayed in a datagrid, and when a row is selected, the feature is selected in the map.
Is it what you want to do?


Thank you very much Dominique!
0 Kudos