I have successfully bind a datagrid and I am getting the results populated ,also after clicking on the results/rows in the datagrid, the graphic layer on the map highlights the graphics by symbol change.
But my issue now is that if I change the querytask parameters, as per user selection criteria for query from code behind my attribute binding in xaml will not work at all... please help me here 🙂
My code for datagrid ---
<slData:DataGrid x:Name="FindDetailsDataGrid" AutoGenerateColumns="False" HeadersVisibility="All" Background="White"
BorderBrush="Black" BorderThickness="1" RowStyle="{StaticResource MyCustomRow}" SelectionChanged="FindDetailsDataGrid_SelectionChanged" LoadingRow="FindDetailsDataGrid_LoadingRow"
HorizontalScrollBarVisibility="Hidden" Grid.Row="1" CanUserSortColumns="True"
IsReadOnly="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Height="Auto" Width="Auto" >
<slData:DataGrid.Columns>
<slData:DataGridTextColumn CanUserSort="False" Binding="{Binding Attributes[use_]}" Header="Use"/>
<slData:DataGridTextColumn CanUserSort="False" Binding="{Binding Attributes[use_type]}" Header="use_type"/>
I have already tried the suggestions given in other forums posts for using esritoolkit featuredatagrid and the code is >>----
<esritoolkit:FeatureDataGrid x:Name="FindDetailsDataGrid" AutoGenerateColumns="True" HeadersVisibility="All" Background="White"
BorderBrush="Black" BorderThickness="1" RowStyle="{StaticResource MyCustomRow}" SelectionChanged="FindDetailsDataGrid_SelectionChanged" LoadingRow="FindDetailsDataGrid_LoadingRow"
HorizontalScrollBarVisibility="Hidden" Grid.Row="1" CanUserSortColumns="True"
IsReadOnly="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Height="Auto" Width="Auto" Map="{Binding ElementName=Map}" GraphicsLayer="{Binding Path=Layers[MyGraphicsLayer], ElementName=Map}" >
but after all tries (try outs / combinations) , my purpose of highlighting the graphics on the graphic layer as per user row selection on datagrid is defeated 😞 ....
esritoolkit:FeatureDataGrid with AutoGenerateColumns="True" -----> this parameter generates rows filled with useless details..
------------------------------
Please guide me on how to have automatic datagrid row populated without binding each attribute , from xaml. Because if I bind attributes in XAML then I cannot modify attributes as per new query. CODE SNIPPET will help.. thnx in advance