If you want to save edits explicitly, you need to set AutoSave on the FeatureLayer to False. http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLay....
The following documentation explains SaveEdits, Update and Refresh:
http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLay...
http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLay...
http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.GraphicsLa...
Hi Jenn -THanks for jumping in on this one. I have tried all of those in about every combination you can think of. Presently, my layer looks like this <esri:FeatureLayer ID="AllAvailableFeatureLayer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/testprojectALLBikeCounts/FeatureServer/0"
Renderer="{StaticResource AllRenderer}"
MouseLeftButtonUp="AllAvailableFeatureLayer_MouseLeftButtonUp"
SelectionColor="Yellow"
OutFields="Location,VolunteerAM,PhoneAM,EmailAM,SpanishAM,VolunteerPM,PhonePM,EmailPM,SpanishPM"
DisableClientCaching="True"
Where="VolunteerAM = 'Available' and VolunteerPM = 'Available'"
AutoSave="True">
<esri:FeatureLayer.MapTip>
<Border CornerRadius="10" BorderBrush="SaddleBrown" BorderThickness="3" Margin="0,0,15,15" Background="LightGray">
<StackPanel Margin="7">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Location: " Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [Location]}" Foreground="Black" />
</StackPanel>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
Note AutoSave is true. The code behind that I think should work looks like thisprivate void MyFeatureDataForm_EditEnded(object sender, EventArgs e)
{
foreach (Layer lyr in MyMap.Layers)
{
if (lyr is FeatureLayer)
{
FeatureLayer featureLayer = lyr as FeatureLayer;
featureLayer.Update();
}
}
}
However, with this code the save does not even work. If I comment out the Update(), the save DOES work. Strange right? As I thought about this over the weekend I wondered if maybe the save is working but the Update() is somehow causing a second save and restoring the original data from a cache somewhere. Could that be possible?