Hi,
Is it possible to hide or disable the "copy selected rows to the clipboard" button, located in the attribute table? (the id of the button is "esri_editing_table_tableCopySelectedRowsButton").
I have tried to disable it with the OnCanExecuteCommand method but returning false does not do it:
protected override bool OnCanExecuteCommand(string cmdID, string moduleID)
{
if (cmdID=="esri_editing_table_tableCopySelectedRowsButton")
{
return false;
}
return base.OnCanExecuteCommand(cmdID, moduleID);
}
I have also tried to hide it with the OnUpdateDatabase method, but removing it does not remove it either:
protected override void OnUpdateDatabase(XDocument database)
{
var nsp = database.Root.Name.Namespace;
var btnElements = from seg in database.Root.Descendants(nsp + "button") select seg;
var elements = new HashSet<XElement>();
foreach (var btnElement in btnElements)
{
if (btnElement.Attribute("id") != null)
{
var id = btnElement.Attribute("id").Value;
if(id == "esri_editing_table_tableCopySelectedRowsButton")
{
elements.Add(btnElement);
}
}
}
foreach (var element in elements)
{
element.Remove();
}
}
ArcGIS Pro 3.1
Thank you
i think that button is part of the built-in menu for the table view control. The daml button is just there for shortcut keys. It's not actually on any menus - at least as near as i can tell. The only entries I found for that id were in Editing.daml....note that there is no refID for that button in any menus/groups etc. - just the shortcut.
<shortcut refID="esri_editing_table_tableCopySelectedRowsButton" key="C" flags="Ctrl+Shift" onKeyUp="false"/>
<button id="esri_editing_table_tableCopySelectedRowsButton" caption="Copy" extendedCaption="" className="esri_editing_EditingModule:TableManager.CopySelectedRows" smallImage="CopySelectedRows16" largeImage="CopySelectedRows32"
loadOnClick="false">
<tooltip heading="Copy Selection">
Copy selected rows to the clipboard.<disabledText></disabledText>
</tooltip>
</button>