I am wanting to update the fields on my server using a FeatureDataForm. I have followed the documentation, but it still does not work. It also does not have the buttons in the form that say 'OK' and 'Delete' like the documentation does. Any help will be appreciated.
XAML (FeatureDataForm):
<Border x:Name="FeatureDataFormBorder" Visibility="Collapsed"
HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10,10,10,0" Width="300" Height="300" >
<Border.Effect>
<DropShadowEffect Color="Black" Direction="-45" BlurRadius="20" Opacity=".75" />
</Border.Effect>
<esri:FeatureDataForm x:Name="MyFeatureDataForm" Foreground="Black" BorderBrush="{StaticResource PanelGradient}" BorderThickness="12"
IsReadOnly="False" LabelPosition="Left" />
</Border>
XAML(MyMap):
<esri:Map x:Name="MyMap" Background="#FFE3E3E3" WrapAround="True" MouseRightButtonDown="MyMap_MouseRightButtonDown" Extent="-9834972.92753924,4441899.425293319,-9833977.88119163, 4442762.485358352" Loaded="MyMap_Loaded">
<esri:Map.Layers>
<esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:FeatureLayer ID="WaterValves" Url="http://localhost:6080/arcgis/rest/services/CalvertCity_Test_2/MapServer/0" Renderer="{StaticResource MySimpleRenderer}"
OutFields="*" MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp" MouseLeftButtonDown="FeatureLayer_MouseLeftButtonDown_1" DisableClientCaching="True" Mode="OnDemand"/>
<esri:GraphicsLayer ID="CandidateGraphicsLayer">
<esri:GraphicsLayer.MapTip>
<Grid>
<Rectangle Stroke="Gray" RadiusX="10" RadiusY="10" Fill="#77FF0000" Margin="0,0,0,5" >
<Rectangle.Effect>
<DropShadowEffect/>
</Rectangle.Effect>
</Rectangle>
<Rectangle Fill="#DDFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,15" />
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="30,20,30,30">
<TextBlock Text="{Binding [Address]}" HorizontalAlignment="Left" Foreground="Black" />
</StackPanel>
</Grid>
</esri:GraphicsLayer.MapTip>
</esri:GraphicsLayer>
<esri:ArcGISDynamicMapServiceLayer ID="CalvertCity" Url="http://localhost:6080/arcgis/rest/services/CalvertCity_Test_2/MapServer" />
</esri:Map.Layers>
</esri:Map>
C#:
private void MyMap_Loaded(object sender, RoutedEventArgs e)
{
MyFeatureDataForm.FeatureLayer = MyMap.Layers[1] as ESRI.ArcGIS.Client.FeatureLayer;
}
private void FeatureLayer_MouseLeftButtonDown_1(object sender, GraphicMouseButtonEventArgs e)
{
e.Graphic.Selected = !e.Graphic.Selected;
if (e.Graphic.Selected)
MyDataGrid.ScrollIntoView(e.Graphic, null);
}
I believe this tells me that the map is editable: