Custom Widget with FeatureDataGrid

1448
1
04-04-2014 10:00 AM
JosephMcCausland
Esri Contributor
Is it possible to put a FeatureDataGrid in a custom Widget and hook it up to a MapWidget.Map graphics layer?
0 Kudos
1 Reply
TifPun
by
Occasional Contributor II
Hi Joseph,

Yes you can do that. Indeed, we have a sample widget in Esri GitHub that does a similar function. You can find the widget from here then look at the code inside the Widget_Table folder. You will need to make a few slight changes to the code:
1. Add reference to ESRI.ArcGIS.Client.Toolkit
2. In TableWidget.xaml, add the namespace xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
3. Change the <DataGrid> tag in the above file to <esri.FeatureDataGrid>
4. If your version of the WPF SDK is not 10.1.1, please also update the OperationsDashboardAddIns.csproj file by replacing the 4 occurances of "ArcGISRuntimeWPF10.1.1" with your version of the SDK
e.g. registry:HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISRuntimeWPF10.2.2

Then you can put other functionality to your custom widget.

For your question about adding graphics to your map, you can take a look at the DriveTimesFeatureAction addin that comes with the WPF SDK. The typical location of that sample is: C:\Program Files (x86)\ArcGIS SDKs\WPF10.2.2\sdk\samples\sampleapplication\Operations Dashboard Samples\DriveTimesFeatureActionCS

For more information about feature data grid and adding graphics, you can read:

Thanks,

Tif
0 Kudos