When does the Fields Property of LayerDataSource get set?

494
1
11-01-2012 01:23 PM
Labels (1)
EricPaitz
Esri Contributor
We are adding layers on the fly in our application.

DynamicLayerInfo dynamicLayerInfo = new DynamicLayerInfo() {
  ID = <id>,
  Name = <name>,
  DefaultVisibility = <defaultVisibility>,
  MaxScale = <maxScale>,
  MinScale = <minScale>,
  Source = new LayerDataSource() {
    DataSource = new TableDataSource() {
      WorkspaceID = "MyDatabaseWorkspaceID",
      DataSourceName = <dataSourceName>
    }
  }
};


This code is obviously just pseudo code that is part of a loop where we have access to the <bracketed> variables.

Now the LayerDataSource has a Fields (get/set) property. I was REALLY hoping that it would read the Fields from the data source (an SDE Feature Class in our case) and populate the Fields list, but this does not seem to be the case.

So will this Fields property list ever get populated or is it up to the developer to define them?

Thanks,
   -eric
0 Kudos
1 Reply
jp
by
New Contributor II
I am looking for same kind of access to the dynamiclayerinfo. Specifically the attributes and geometry of the layer which is on-the-fly layer.

Here is my post -  http://forums.arcgis.com/threads/70449-Query-dynamic-layer-from-DynamicLayerinfoCollection

No luck so far!
0 Kudos