FeatureDataGrid: What kind of layers can it edit?

272
1
08-12-2011 09:32 AM
Labels (1)
MarkCollins
Occasional Contributor
Hello,

I am using the FeatureDataGrid in my project and have a hit a snag when trying to view the information in all my layers.

When setting the GraphicsLayer property to any of my GraphicsLayer or FeatureLayer layers it works great. It does not work on any of the ArcGISDynamicMapServiceLayer layers. What types of layers is this control compatable with? Do I need to bind to different layer types in a different way/property? Do I need to change the way my services are published on the server to allow feature access or something? I do not wish to allow users to edit all of the layers but would like them to be able to view the attribute information.  The only layers I would like to allow editing are the feature layers.

Here is my layer collection.
    [0]: {ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer}
    [1]: {ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer}
    [2]: {ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer}
    [3]: {ESRI.ArcGIS.Client.FeatureLayer}
    [4]: {ESRI.ArcGIS.Client.FeatureLayer}
    [5]: {ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer}
    [6]: {ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer}
    [7]: {ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer}
    [8]: {ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer}
    [9]: {ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer}
    [10]: {ESRI.ArcGIS.Client.FeatureLayer}
    [11]: {ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer}
    [12]: {ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer}
    [13]: {ESRI.ArcGIS.Client.GraphicsLayer}
    [14]: {ESRI.ArcGIS.Client.GraphicsLayer}

Thanks,
Mark
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
FeatureDataGrid only works with GraphicsLayer and FeatureLayer. If you download the WPF SDK sample, you can see the WPF version for this: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SpatialQuery. Results of queries performed on ArcGISDynamicMapServiceLayer.Url can be stored to a GraphicsLayer and assigned to a FeatureDataGrid.

Here's some documentation about the differences between layers: http://help.arcgis.com/en/webapi/WPF/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Layer.html. ArcGISDynamicMapServiceLayer are features generated on the fly, which means you don't have access to the graphic.Geometry or Attributes until you request for them using Identify, Find, Query, etc.
0 Kudos