Feature Data Grid Online

This sample demonstrates using the ESRI.ArcGIS.Client.Toolkit FeatureDataGrid to view and edit attributes associated with a FeatureLayer.
To use the sample, edit values in the data grid. When finished, click the Commit button to save to the database.
Download Sample Application<UserControl x:Class="ArcGISWPFSDK.ToolkitFeatureDataGrid" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:basics="http://schemas.microsoft.com/wpf/2008/toolkit" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:esri="http://schemas.esri.com/arcgis/client/2009"> <Grid Background="White"> <Grid.Resources> <LinearGradientBrush x:Key="PanelGradient" EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform CenterY="0.5" CenterX="0.5"/> <SkewTransform CenterY="0.5" CenterX="0.5"/> <RotateTransform Angle="176" CenterY="0.5" CenterX="0.5"/> <TranslateTransform/> </TransformGroup> </LinearGradientBrush.RelativeTransform> <GradientStop Color="#FF145787"/> <GradientStop Color="#FF3D7FAC" Offset="0.184"/> <GradientStop Color="#FF88C5EF" Offset="0.984"/> </LinearGradientBrush> </Grid.Resources> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="5" /> <RowDefinition Height="150" /> </Grid.RowDefinitions> <esri:Map x:Name="MyMap" Loaded="MyMap_Loaded" WrapAround="True"> <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> <esri:FeatureLayer ID="IncidentsLayer" Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0" DisableClientCaching="True" Mode="OnDemand" AutoSave="False" OnDemandCacheSize="0" OutFields="req_id,req_date,req_time,address,district,status" MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp"> <esri:FeatureLayer.MapTip> <Border CornerRadius="10" BorderBrush="#FF222957" Background="AliceBlue" BorderThickness="3" Margin="0,0,15,15"> <Border.Effect> <DropShadowEffect ShadowDepth="10" BlurRadius="14" Direction="300" /> </Border.Effect> <StackPanel Margin="7"> <TextBlock Text="{Binding [req_id]}" FontWeight="Bold" Foreground="Black" /> <StackPanel Orientation="Horizontal"> <TextBlock Text="Request: " Foreground="Black" /> <TextBlock Text="{Binding [req_type]}" Foreground="Black" /> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock Text="Status: " Foreground="Black" /> <TextBlock Text="{Binding [status]}" Foreground="Black" /> </StackPanel> </StackPanel> </Border> </esri:FeatureLayer.MapTip> </esri:FeatureLayer> </esri:Map> <GridSplitter Grid.Row="1" HorizontalAlignment="Stretch" /> <esri:FeatureDataGrid Grid.Row="2" x:Name="MyDataGrid" Foreground="Black" /> <Grid HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,10,0" > <Rectangle Fill="{StaticResource PanelGradient}" Stroke="Gray" RadiusX="10" RadiusY="10" Margin="0,0,0,5"> <Rectangle.Effect> <DropShadowEffect/> </Rectangle.Effect> </Rectangle> <Rectangle Fill="#FFFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,15" /> <TextBlock x:Name="ResponseTextBlock" Text="Edit values in the data grid. When finished, click the Commit button to save to the database." Width="200" TextAlignment="Left" Margin="30,20,20,30" TextWrapping="Wrap" Foreground="Black" /> </Grid> </Grid> </UserControl>
5/16/2014