private void FeatureDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { var graphics = (sender as ESRI.ArcGIS.Client.Toolkit.FeatureDataGrid).SelectedGraphics; foreach (var g in graphics) { // get id var id = g.Attributes["UniqueQueryID"]; // TODO: retrieve outside data for this id before you write this //Try sending the UniqueQueryID to a textbox to see if it is working PARCELIDPASS.Text = string.Format("The Parcel ID passed is {0}", id); break; } }
SelectionChanged="FeatureDataGrid_SelectionChanged"
<!-- Parcel ID SHOWER--> <userControls:CollapsiblePanel x:Name="ParcelShower" IsExpanded="True" RenderTransformOrigin="1,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" Margin="0,75,10,0" Effect="{StaticResource dropShadow}" > <Grid Width="350" Height="80" > <Border Background="{StaticResource CommonPanelBorderBackgroundBrush}" BorderBrush="{StaticResource CommonBorderBrush}" BorderThickness="1" CornerRadius="6" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Border Effect="{StaticResource miniDropShadow}" Style="{StaticResource RibbonElementBorder}" Padding="15" Margin="10" > <StackPanel Canvas.Left="20" Canvas.Top="14" Margin="0,5,0,0"> <TextBlock x:Name="PARCELIDPASS" Text="" Foreground="Red" FontWeight="SemiBold" Margin="0,5,0,5" HorizontalAlignment="Center" TextWrapping="Wrap"/> </StackPanel> </Border> </Border> <Image Source="images/CloseX.png" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="3" Stretch="None" Cursor="Hand" ToolTipService.ToolTip="Close" > <i:Interaction.Triggers> <i:EventTrigger EventName="MouseLeftButtonDown" > <actions:ToggleCollapseAction TargetName="ParcelShower" /> </i:EventTrigger> </i:Interaction.Triggers> </Image> </Grid> </userControls:CollapsiblePanel> <!-- END PARCEL SHOWER-->
This might be a related thread http://forums.arcgis.com/threads/16731-Change-value-of-FeatureDataGrid-Cell if you are also working with related tables.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.