This sample shows how to use the WPF DataGrid's 'Multi-Select' feature to select multiple rows from a DataGrid in MVVM. The DataGrid is displayed in a DockPane.
Language: C#
Subject: MVVM-XAML
Contributor: ArcGIS Pro SDK Team <arcgisprosdk@esri.com>
Organization: Esri, https://www.esri.com
Date: 04/04/2024
ArcGIS Pro: 3.3
Visual Studio: 2022
.NET Target Framework: net8.0-windows7.0
- Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the Releases page.
- Download the Community Sample data (see under the "Resources" section for downloading sample data). The sample data contains a project called "FeatureTest.aprx" with data suitable for this sample. Make sure that the Sample data is unzipped in c:\data and "C:\Data\FeatureTest\FeatureTest.aprx" is available.
- Open this solution in Visual Studio.
- Click the build menu and select Build Solution.
- Launch the debugger to open ArCGIS Pro. ArcGIS Pro will open.
- Open the "C:\Data\FeatureTest\FeatureTest.aprx" project.
- Open the Add-in Tab and click on the 'Show DataGrid Dockpane' button to open the DataGrid Dockpane.
- Click the 'Select by Rectangle' button and draw a rectangle around the features in the map. You will see the selected features listed in the DataGrid Dockpane.
- Now use the DataGrid's 'Multi-Select' feature to select multiple features from different layers. You will see the selected features listed in the DataGrid Dockpane by using the 'Control key' while click rows to be selected.
- The multi selection result is displayed on the bottom of the Dockpane.
Home | API Reference | Requirements | Download | Samples