Hi,
I'm trying to apply the RowReorderBehavior (example xaml-sdk) in a hierarchical-gridview and wondering how to enable to childgrid for drah-and-drop.
<controls:GridView
x:Name="GridView"
ItemsSource="{Binding Items}">
<telerik:RadGridView.ChildTableDefinitions>
<telerik:GridViewTableDefinition />
</telerik:RadGridView.ChildTableDefinitions>
<telerik:RadGridView.HierarchyChildTemplate>
<DataTemplate>
<controls:GridView
x:Name="ChildGrid"
AllowDrop="True"
Drop="UIElement_OnDrop"
ItemsSource="{Binding InvoiceLines}"
RowIndicatorVisibility="Visible"
SelectedItem="{Binding CurrentChild, Mode=TwoWay}">
<controls:GridView.Resources>
<DataTemplate x:Key="DraggedItemTemplate">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Dragging:" />
<TextBlock FontWeight="Bold" Text="{Binding CurrentDraggedItem}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock
MinWidth="45"
FontWeight="Bold"
Text="{Binding CurrentDropPosition}" />
<TextBlock Foreground="Gray" Text=", (" />
<TextBlock Text="{Binding CurrentDraggedOverItem}" />
<TextBlock Foreground="Gray" Text=")" />
</StackPanel>
</StackPanel>
</DataTemplate>
</controls:GridView.Resources>
<controls:GridView.RowStyle>
<Style TargetType="telerik:GridViewRow">
<Setter Property="telerik:DragDropManager.AllowDrag" Value="True" />
<Setter Property="telerik:DragDropManager.TouchDragTrigger" Value="TapAndHold" />
</Style>
</controls:GridView.RowStyle>
in the code behind is want to enable the childgrid like: RowReorderBehavior.SetIsEnabled(childgrid, isEnabled);
My problem is how to find the dependencyobject for the childgrid. Trying something like this...
this.GridView.HierarchyChildTemplate.FindName("ChildGrid", ????)