You can go ahead and leave the "*" in place on your layer. The OBJECTID field is ignored if you let the data grid AutoGenerate the Columns. If you want to continue to see all the fields plus the OBJECTID field leave AutoGenerateColumns = True and add the OBJECTID manually. Or you can add all the fields you would like to see and turn off the AutoGenerateColumns. Here is the code to be able to do that.Add the following to the top:xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
And Edit your FeatureDataGrid as follows:<esri:FeatureDataGrid Grid.Row="3" Grid.ColumnSpan="3" x:Name="MyDataGrid" Map="{Binding ElementName=MyMap}" MaxHeight="400" AutoGenerateColumns="True" GraphicsLayer="{Binding Layers.[MyFeatureLayer], ElementName=MyMap}" > <esri:FeatureDataGrid.Columns> <sdk:DataGridTextColumn Binding="{Binding OBJECTID}" Width="Auto" Header="Object ID"/> </esri:FeatureDataGrid.Columns> </esri:FeatureDataGrid>
If you want to add other fields just continue to add:<sdk:DataGridTextColumn Binding="{Binding OBJECTID}" Width="Auto" Header="Object ID"/>
Binding to the field from your data source. You can add other field types to your datagrid in this same manner. You can add a DataGridCheckBoxColumn and a DataGridTemplateColumn.Hope this helps.Chris