![]() ![]() |
ESRI.ArcGIS.ADF.IMS | |
Fields Property | |
See Also Example Send Feedback |
ESRI.ArcGIS.ADF.IMS.Data Namespace > Dataset Class : Fields Property |
Visual Basic (Declaration) | |
---|---|
<XmlIgnoreAttribute()> Public ReadOnly Property Fields As DataColumnCollection |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As Dataset Dim value As DataColumnCollection value = instance.Fields |
C# | |
---|---|
[XmlIgnoreAttribute()] public DataColumnCollection Fields {get;} |
The following example prints a list of the field names in a FeatureLayer to a ListBox. The code assumes an existing MapView object.
C# | ![]() |
---|---|
// Get the fields for a feature layer FeatureLayer theLayer = (FeatureLayer) mapView.Layers.FindByName("Cities"); ESRI.ArcGIS.ADF.IMS.Data.StaticLayerDataset layerDataset = theLayer.Dataset as ESRI.ArcGIS.ADF.IMS.Data.StaticLayerDataset; DataColumnCollection layerFields = layerDataset.Fields; // Display the fields in a listbox - shows the column names ListBox1.DataSource = layerFields; ListBox1.DataBind(); |
Visual Basic | ![]() |
---|---|
' Get the fields for a feature layer Dim theLayer As FeatureLayer = CType(mapView.Layers.FindByName("Cities"), FeatureLayer) Dim layerDataset As ESRI.ArcGIS.ADF.IMS.Data.StaticLayerDataset layerDataset = CType(theLayer.Dataset, ESRI.ArcGIS.ADF.IMS.Data.StaticLayerDataset) Dim layerFields As DataColumnCollection = layerDataset.Fields ' Display the fields in a listbox - shows the column names ListBox1.DataSource = layerFields ListBox1.DataBind() |
Contains information about the attribute fields for a FeatureLayer. The Fields are a standard .NET DataColumnCollection. Individual columns can be examined to find the data type and name of the attribute fields.
This property will be null if the InitializationParameters used when creating the map has its LoadFields property set to false.
Fields will also be null for a Dataset associated with an ImageLayer.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family