I would like to add custom functionality to the esri attribute table like moving rows up and down, duplicating rows, etc. I could use the TableControl but it lacks most of the functionality of an attribute table like 'add row','delete row', 'copy',etc and I am not enthusiastic about writing all that functionality from scratch.
That leaves me with using the code below to open up the layer's attribute table and working with that.
protected override void OnClick()
{
var lyrs = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>();
MapView.Active.SelectLayers(lyrs.ToList());
var openTableBtnCmd = FrameworkApplication.GetPlugInWrapper("esri_editing_table_openTablePaneButton") as ICommand;
if (openTableBtnCmd != null)
{
// Let ArcGIS Pro do the work for us
if (openTableBtnCmd.CanExecute(null))
{
openTableBtnCmd.Execute(null);
}
}
}
But I would need this attribute table to show up in my custom dockpane since I need to have a total of 4 attribute tables from different layers all on the same dockpane.
How do I open the attribute table in a custom dockpane? Uma Harano Wolfgang Kaiser
Hi Marvis,
There is a table control that you can use for your dockpane (https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-TableControl), however, the TableControl is read-only. I will add a community sample soon with an attribute table dockpane that contains multiple TableControls, but it's still a read-only implementation. So currently your 'esri_editing_table_openTablePaneButton' approach is probably the best way to implement your workflow needs.
I added the dockpane with multiple TableControls sample here: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/TableControlsDo...
Thanks Wolf.