I'm loading a feature layer to ArcMap and want to prepare the columns shown in the attribute-table. Aliasname and visibility I set with ILayerFields-Interface of the FeatureLayer by passing it to the IFieldInfo. But I haven't found a way to set the order of the columns.

Found out reading the column-order is possible with FindFields:

public virtual object FindFields { get; }
    Member of ESRI.ArcGIS.Carto.FeatureLayerClass

It gives me the column-names in choosed order. But it has only a get and not a set.

Does anybody has an idea?

  • 1
    Usually, the only way to change column order is to physically change the data source by rewriting it in the desired order. The exception to this is Query Layers, since they are based on a SELECT statement which can be altered.
    – Vince
    Feb 20 '20 at 12:03
  • 1
    @Vince This I couldn't believe, because in ArcMap in layerproperties you can change the column-order in the fields tab and the datasource will not be changed even in shape files.
    – Ms. Smith
    Feb 20 '20 at 13:01

Found the right interface by searching the Object Browser of Visual Studio...

public virtual void SetFieldOrder(ESRI.ArcGIS.Carto.IFieldInfoSet FieldInfoSet)
Member of ESRI.ArcGIS.Carto.FeatureLayerClass

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.