Dynamically Loading FeatureDataGrids

529
1
Jump to solution
01-08-2013 11:46 AM
jonathangamble
New Contributor III
Hi,

I'm new to the Silverlight API and have a question concerning FeatureDataGrids

I have a ComboBox, which is dynamically loaded at runtime with a list of feature layers currently in the map.  I want to have the user select a feature layer from the combobox and have the related attribute data populate in a DataGrid.

Can I use FeatureDataGrids for this - and if so, can anyone point me to an example?  If not - can anyone point me to an example with this logic?


Thanks
0 Kudos
1 Solution

Accepted Solutions
jonathangamble
New Contributor III
After a long search I found my answer: Yes, this is possible.

I used this thread to find the solutions: http://forums.arcgis.com/threads/22818-Can-I-change-the-data-binding-for-a-FeatureDataGrid-in-code%E...

Basically, I set my featuredatagrid.graphicslayer to equal the selected featurelayer within the combobox (I should also note that I did not need to set a Map binding for my featuredatagrid).

Also, I had to make sure that the 'AutoGenerateColumns' option was set to true for my featuredatagrid to ensure my columns were displayed for each of the feature layers.

View solution in original post

0 Kudos
1 Reply
jonathangamble
New Contributor III
After a long search I found my answer: Yes, this is possible.

I used this thread to find the solutions: http://forums.arcgis.com/threads/22818-Can-I-change-the-data-binding-for-a-FeatureDataGrid-in-code%E...

Basically, I set my featuredatagrid.graphicslayer to equal the selected featurelayer within the combobox (I should also note that I did not need to set a Map binding for my featuredatagrid).

Also, I had to make sure that the 'AutoGenerateColumns' option was set to true for my featuredatagrid to ensure my columns were displayed for each of the feature layers.
0 Kudos