Active FeatureLayers from Editor

406
2
09-09-2011 09:53 AM
AjaySisodia2
New Contributor
Hello:

I have a feature class and bunch of standalone tables which are published as FeatureServer.

In my application I need to provide functionality to update Feature Layer and the associated table. The tables are initialized dynamically to support editing. 

I know the two ways to get the active feature layers ( FeatureLayer fLayer = this.MapControl.Layers[layerID] as FeatureLayer; ) and ( IEnumerable<GraphicsLayer> graphicsLayer = featureEditor.GraphicsLayers; foreach (GraphicsLayer gl in graphicsLayer) fLayer = gl as FeatureLayer; )

Both of the above methods are unable to return the table as Feature layer.

How should i get the tables from Editor as Feature Layer?

Thanks in advance.
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
You create FeatureLayer for each standalone table and do not add them to Map.Layers, is that correct? Are you using FeatureDataForm to update the table? If yes, you cannot expect Map.Layers or Editor.GraphicsLayers to report these layers. What you can do is store them to a different LayerCollection and use this LayerCollection to access layers from standalone tables.
0 Kudos
AjaySisodia2
New Contributor
hi Jennifer,

yes, i am using the modified FeatureDataForm to edit tables and using the list to control the tables.

Thanks for the response. Thanks!
0 Kudos