Select to view content in your preferred language

Need new context menu when Right-clicked the actual field values/cells in the bottom grid of Attribute Pane

693
7
02-08-2026 10:02 PM
RavindraSingh
Frequent Contributor

Problem Statement:
In the Attribute Pane, when right-clicking on actual field values or cells within the bottom grid, the expected context menu option “Catalog Help…” is not visible. However, I am able to add this context button in the Top section of the Attribute Pane as well as in the Attribute Table.

Below is the screenshot:

RavindraSingh_0-1770615144541.png

here is the configuration I tried in the config.daml file:

<!-- The button is added to the context menu of the attribute table. It's working.-->
<updateMenu refID="esri_editing_tableCellContextMenu">
	<!-- Inserts the button with a separator at a specific place -->
	<insertButton refID="POC_Addins_CustomContext_Views_CatalogHelpBtn" />
</updateMenu>


<updateMenu refID="esri_editing_Attributes_RelatedNonFeatureRowContextMenu">
	<insertButton refID="POC_Addins_CustomContext_Views_CatalogHelpBtn" separator="true" placeWith="esri_editing_Attributes_StandaloneTablePropertiesContextMenuItem" />
</updateMenu>

<!-- 2. esri_editing_Attributes_NonFeatureRowContextMenu: is used for standalone table records that are open in the Attributes Pane but are not currently being viewed as a "related child" of a map feature.
     e.g. In ArcGIS Pro, when you open a standalone table (one without geometry) and select a row, that row appears in the Attributes Pane. This specific refID controls the right-click menu for that record's entry in the selection tree.-->
<updateMenu refID="esri_editing_Attributes_NonFeatureRowContextMenu">
	<insertButton refID="POC_Addins_CustomContext_Views_CatalogHelpBtn" separator="true" placeWith="esri_editing_Attributes_StandaloneTablePropertiesContextMenuItem" />
</updateMenu>

<updateMenu refID="esri_editing_Attributes_FeatureContextMenu">
	<insertButton refID="POC_Addins_CustomContext_Views_CatalogHelpBtn" separator="true" placeWith="esri_editing_Attributes_LayerPropertiesContextMenuItem" />
</updateMenu>

<!-- esri_editing_Attributes_FeatureRowContextMenu: Right-clicking a Map Feature (Point, Line, Poly) in the top selection tree. -->
<updateMenu refID="esri_editing_Attributes_FeatureRowContextMenu">
	<insertButton refID="POC_Addins_CustomContext_Views_CatalogHelpBtn" separator="true" />
</updateMenu>


<!-- esri_editing_AttributesPaneAttributesContextMenu: Right-clicking the actual field values/cells in the bottom grid. -->
<updateMenu refID="esri_editing_AttributesPaneAttributesContextMenu">
	<insertButton refID="POC_Addins_CustomContext_Views_CatalogHelpBtn" separator="true" />
</updateMenu>

<updateMenu refID="esri_editing_AttributesPane_GridContextMenu">
	<insertButton refID="POC_Addins_CustomContext_Views_CatalogHelpBtn" separator="true" />
</updateMenu>

 

 

0 Kudos
7 Replies
JMutunga
Esri Contributor

@RavindraSingh  Can you share a screenshot of the menu you are trying to add your button to?

 

0 Kudos
RavindraSingh
Frequent Contributor

@JMutunga  here is the screen shot of the menu I am trying to add. And on that button, I want to get the current layer  / table and that feature's objectid/globalid as well.

RavindraSingh_0-1770918847122.png

 

0 Kudos
JMutunga
Esri Contributor

That menu is not currently exposed in the Editing daml.

Are you not able to do this on the esri_editing_Attributes_FeatureContextMenu? It would be great if you could provide more context why the menu on the grid is prefered.

And on that button, I want to get the current layer  / table and that feature's objectid/globalid as well.

 

0 Kudos
RavindraSingh
Frequent Contributor

@JMutungaI want to add a button that reacts to the specific field where the user has just right‑clicked. The goal is to detect which field was right‑clicked and then trigger an action based on that field. Different fields will have different actions associated with them. 
Similar thing I can get from the Attribute Table's custom Context menu button.

0 Kudos
JMutunga
Esri Contributor

@RavindraSingh Thanks for elaborating. 

We'll track your request.

If you want to be able to follow it's progress, I'd recommend creating an ArcGIS Pro Idea .

RavindraSingh
Frequent Contributor

@JMutunga  Here is some more details how at Attribute Table context Menu it gives:

Context Menu Button Click Handler on Attribute Table:

ttttttt.png

Below source code implements a custom context menu button click handler. When a user right‑clicks within the Attribute Table of a Feature Class or Table, the handler retrieves the selected column name and the corresponding row’s ObjectID. The functionality is specifically designed to support a custom context menu button integrated into the Attribute Table interface.

protected override async void OnClick()
{
    await QueuedTask.Run(async () =>
    {
        var tablePane = FrameworkApplication.Panes.ActivePane as ITablePane;
        if (tablePane == null) return;

        // Here I am getting the Currently Right clicked FieldName and the Row's objectID as well
        string fieldName = tablePane.ActiveColumn?.Name;
        long activeObjectId = (long)tablePane.ActiveObjectID;

        if (string.IsNullOrEmpty(fieldName)) return;

        var mapMember = tablePane.MapMember;
        if (mapMember == null) return;

        bool isEditable = false;
        string memberName = mapMember.Name;

        // Check for FeatureLayer
        if (mapMember is FeatureLayer fl)
        {
            isEditable = fl.IsEditable;
        }
        else if (mapMember is StandaloneTable st)
        {
            isEditable = st.IsEditable;
        }
        else
        {
            // Not a supported editable type
            System.Windows.Application.Current.Dispatcher.Invoke(() =>
            {
                ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(
                    $"The selected item '{memberName}' is not an editable layer or table.",
                    "Not Editable",
                    MessageBoxButton.OK,
                    MessageBoxImage.Warning);
            });
            return;
        }

        if (!isEditable)
        {
            System.Windows.Application.Current.Dispatcher.Invoke(() =>
            {
                ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(
                    $"Layer or table '{memberName}' is not editable. Please ensure it is editable before making changes.",
                    "Not Editable",
                    MessageBoxButton.OK,
                    MessageBoxImage.Warning);
            });
            return;
        }

        await ShowDialogAndUpdateRecord(mapMember, fieldName, activeObjectId);
    });
}

 

RavindraSingh
Frequent Contributor
0 Kudos