Goal --- Hide Attribute Fields in an attribute table
Given a feature class with an attribute table, how would attribute fields be programmatically shown/hidden?
Places already researched...
ProSnippets Editing · Esri/arcgis-pro-sdk Wiki (github.com)
ArcGIS.Desktop.Editing.Controls Namespace—ArcGIS Pro
Thank You... This worked perfectly. Nice little piece of code.
Hi,
Have you tried this:
How-to-change-field-visibility-and-alias
Try this:
var invisibleFields = new[] { "OBJECTID", "HIDDEN_FIELD" }; var layer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault(); var fields = layer.GetFieldDescriptions(); foreach (var field in fields) { field.IsVisible = !invisibleFields.Contains(field.Name); } layer.SetFieldDescriptions(fields);
Gintautas,
Thank You for your reply.
Have a Good Day
Hi All,
I have a point feature class with more than 50 fields that mainly consist of fixed values ("Yes" or "No"). I am looking for an approach to only show fields if they have a "Yes" value when I select a feature. For example, when I select a row or pick a point from the map, it only shows fields "A", "B", and "D" where they have a "Yes" value, but don't show field "C" that has a "No" value. And when I select another point, it should show its fields that have a "Yes" value which could be field "A" and "C".
Your feedback appreciated.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.