Select to view content in your preferred language

Need to show ObjectId in feature data grid

3537
1
Jump to solution
05-21-2015 07:45 AM
ivarivar
New Contributor

Hi friends,

I am a newbie in the GIS devlopement and trying to get the objectid shown in the featuredatgrid for silverlight application.

Here is the already existing code fo my project:

<Grid x:Name="FeatureDataGridModuleLayoutRoot">

  <esri:FeatureDataGrid  x:Name="MapFeatureDataGrid" Map="{Binding Path=MapObject, Mode=TwoWay}" >

  </esri:FeatureDataGrid>

  </Grid>

I need to keep the existing columns and add the objectid. How can it be done in XAMl or  in the code behind.

Thank you in advance

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
ivarivar
New Contributor

Posting my answer here just in case someone else may need it in future:

<Grid x:Name="FeatureDataGridModuleLayoutRoot">

        <esri:FeatureDataGrid  x:Name="MapFeatureDataGrid" Map="{Binding Path=MapObject, Mode=TwoWay}">

            <esri:FeatureDataGrid.Columns>

                <sdk:DataGridTextColumn  x:Name="OBJECTID" Width="100" Binding="{Binding OBJECTID}" Header="OBJECTID"   />

            </esri:FeatureDataGrid.Columns>

        </esri:FeatureDataGrid>

  </Grid>

View solution in original post

0 Kudos
1 Reply
ivarivar
New Contributor

Posting my answer here just in case someone else may need it in future:

<Grid x:Name="FeatureDataGridModuleLayoutRoot">

        <esri:FeatureDataGrid  x:Name="MapFeatureDataGrid" Map="{Binding Path=MapObject, Mode=TwoWay}">

            <esri:FeatureDataGrid.Columns>

                <sdk:DataGridTextColumn  x:Name="OBJECTID" Width="100" Binding="{Binding OBJECTID}" Header="OBJECTID"   />

            </esri:FeatureDataGrid.Columns>

        </esri:FeatureDataGrid>

  </Grid>

0 Kudos