This is the second time that I have posted about this. In my previous question they told me I needed to enable the Feature Access capability. I did this and then it said I needed to have a Data Store with type SDE. After fighting with this for a week, I finally got the service to publish with these capabilities... and guess what... it still does not work. Below is my code and a series of screen shots. Any help is appreciated.
XAML (Revelant):
<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_Server/MapServer/0"
Renderer="{StaticResource MySimpleRenderer}"
OutFields="*"
MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp"
MouseLeftButtonDown="FeatureLayer_MouseLeftButtonDown_1"
DisableClientCaching="True"
OnDemandCacheSize="0"
Mode="OnDemand"
AutoSave="False"/>
<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_Server/MapServer" />
</esri:Map.Layers>
</esri:Map>
<GridSplitter Grid.Row="1" HorizontalAlignment="Stretch"/>
<esri:FeatureDataGrid Grid.Row="2" x:Name="MyDataGrid"/>
<Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,15,15,0" x:Name="USS_Data" Height="600" Width="298" Visibility="Hidden">
<Rectangle Fill="{StaticResource PanelGradient}" Stroke="Gray" RadiusX="10" RadiusY="10" Margin="0,0,0,39">
<Rectangle.Effect>
<DropShadowEffect />
</Rectangle.Effect>
</Rectangle>
<Rectangle Fill="#DDFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,48" Height="Auto" />
<DockPanel HorizontalAlignment="Stretch" Margin="30,20,30,30">
<telerik:RadGridView Height="240" DockPanel.Dock="Top" Foreground="Black">
</telerik:RadGridView>
<esri:FeatureDataForm x:Name="MyFeatureDataForm" Height="240" Foreground="Black" DockPanel.Dock="Bottom"
IsReadOnly="False" LabelPosition="Left" />
</DockPanel>
</Grid>
Let me know if some necessary parts of my XAML are missing.
C#(Relevant):
private void FeatureLayer_MouseLeftButtonUp(object sender, GraphicMouseButtonEventArgs e)
{
FeatureLayer flayer = sender as FeatureLayer;
MapPoint clickpoint = MyMap.ScreenToMap(e.GetPosition(MyMap));
if (clickpoint != lastPoint)
{
MyInfoWindow.Anchor = clickpoint;
MyInfoWindow.Content = e.Graphic.Attributes;
MyInfoWindow.IsOpen = true;
lastPoint = clickpoint;
}
FeatureLayer featureLayer = sender as FeatureLayer;
for (int i = 0; i < featureLayer.SelectionCount; i++)
featureLayer.SelectedGraphics.ToList()[i].UnSelect();
e.Graphic.Select();
MyFeatureDataForm.GraphicSource = e.Graphic;
// FeatureDataFormBorder.Visibility = Visibility.Visible;
USS_Data.Visibility = Visibility.Visible;
PortalGrid.Visibility = Visibility.Hidden;
}
private void MyInfoWindow_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
MyInfoWindow.IsOpen = false;
//FeatureDataFormBorder.Visibility = Visibility.Hidden;
USS_Data.Visibility = Visibility.Hidden;
PortalGrid.Visibility = Visibility.Visible;
}
private void MyDataGrid_Initialized(object sender, EventArgs e)
{
MyDataGrid.GraphicsLayer = MyMap.Layers[1] as GraphicsLayer;
}
private void MyMap_Loaded(object sender, RoutedEventArgs e)
{
MyDataGrid.Map = MyMap;
MyDataGrid.GraphicsLayer = MyMap.Layers[1] as ESRI.ArcGIS.Client.GraphicsLayer;
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);
}
}
Again, let me know if there is something that I need to include.
Pictures!
I will start with pictures of my settings in ArcGIS for Server:
This shows that my service is running:
This shows the capabilities:
This shows the data store:
Now for what it looks like to the user...
The legend with the database data:
The map showing the points and labels:
The Grid which will never let me commit or remove a selection:
And the Dataform which does not have the save button like I have seen others have:
Warnings when Analyzing map before publishing:
Any help will be greatly appreciated. I am at a point where I don't know where else to go.