here i am using nested datagrid this is design of my xaml code
<
telerik:RadGridView x:Name="RadGrid1" Grid.Row="1" Grid.Column="0" ScrollViewer.HorizontalScrollBarVisibility ="Disabled" AreRowDetailsFrozen="True" BorderThickness="0" CanUserResizeColumns="False" RowHeight="24" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" CanUserFreezeColumns="False" SelectionMode="Extended" RowDetailsVisibilityMode="Collapsed" IsReadOnly="True" AutoGenerateColumns="False" RowDetailsVisibilityChanged="RadGrid1_RowDetailsVisibilityChanged" SelectionChanged="RadGrid1_SelectionChanged" RowLoaded="RadGrid1_RowLoaded" RowUnloaded="RadGrid1_RowUnloaded">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn>
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<Button x:Name="myButton"
Click="ExpandLevel1_Click">
<Image x:Name="imgLevel1" Source="Images/left_side.png" Stretch="None" />
</Button>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Header="name" Width="*" >
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<my:Label Content="{Binding name}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Header="Age" Width="100" >
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<my:Label Content="{Binding Age}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
<telerik:RadGridView.RowDetailsTemplate>
<DataTemplate>
<StackPanel x:Name="spLevel2" >
</StackPanel>
</DataTemplate>
</telerik:RadGridView.RowDetailsTemplate>
</telerik:RadGridView x: name ="RadGrid2" >
</
StackPanel>
</DataTemplate>
</telerik:RadGridView.RowDetailsTemplate>
</telerik:RadGridView>
in grid1 i am finding grid2 then creating vents for teh grid2
if
(RadGrid2 != null)
{
RadGrid2.RowDetailsVisibilityChanged +=
new EventHandler<GridViewRowDetailsEventArgs>(RadGrid2_RowDetailsVisibilityChanged);
RadGrid2.SelectionChanged +=
new EventHandler<SelectionChangeEventArgs>(RadGrid2_SelectionChanged);
}
when i click on the row of my second datagrid only
RadGrid2_SelectionChanged events should be called
but here even my RadGrid1 (RadGrid1_SelectionChanged) is getting fired
is there any way i can solve this issue.
any help would be great
thanks.