This document is archived and information here might be outdated.  Recommended version.


IFeatureLayer2.DisplayField Property (ArcObjects .NET 10.7 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IF > IFeatureLayer2 Interface > IFeatureLayer2.DisplayField Property
ArcGIS Developer Help

IFeatureLayer2.DisplayField Property

Primary display field.

[Visual Basic .NET]
Public Property DisplayField As String
[C#]
public string DisplayField {get; set;}
[C++]
HRESULT get_DisplayField(
  System.String* FieldName
);
[C++]
HRESULT put_DisplayField(
  BSTR FieldName
);
[C++]
Parameters
FieldName [out, retval]

FieldName is a parameter of type BSTR* FieldName [in]
FieldName is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The name of the layer's primary display field.

Remarks

Usually this field name contains the string "name", or is the first string field found in the layer's attributes. This field is used to show map tips for the layer. The value of this property must match the name of one of the fields in the layer's FeatureClass.

Note, if a display expression is set, this method will return a nullstring if queried and fail if you try to set a value. See IDisplayExpressionProp for more information.

See Also

IFeatureLayer2 Interface