Hello,
is there any way to achieve WPF .NET 4 drag and drop between grids with different data, for example on the left grid (drag source) you have products and on the right grid (drop target) we have Orders, Orders has Name and Date plus collection of Products, Order
grid can be grouped with expand collapse by Products list (we can hide or show all Products within an Order), and finally we can drag Product from left grid to particular Order in the right grid?
Orders grid looks like this (it has expandable childtemplate with Products):
How exactly I register RadDragAndDropManager.AddDropQueryHandler for
When I try in code behind:
I have got error:
Error 1 The name 'TelerikDetailGrid' does not exist in the current context C:\test\MainWindow.xaml.cs 35 55
In other words to add Product to Order by drag and drop? If possible by using multi-select - slecting one or more Product?
thank you
is there any way to achieve WPF .NET 4 drag and drop between grids with different data, for example on the left grid (drag source) you have products and on the right grid (drop target) we have Orders, Orders has Name and Date plus collection of Products, Order
grid can be grouped with expand collapse by Products list (we can hide or show all Products within an Order), and finally we can drag Product from left grid to particular Order in the right grid?
Orders grid looks like this (it has expandable childtemplate with Products):
<
telerikGrid:RadGridView
x:Name
=
"TelerikOrdersGrid"
AutoGenerateColumns
=
"False"
ShowGroupPanel
=
"False"
Grid.Column
=
"0"
>
<
telerikGrid:RadGridView.Columns
>
<
telerikGrid:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
Width
=
"100"
/>
</
telerikGrid:RadGridView.Columns
>
<
telerikGrid:RadGridView.ChildTableDefinitions
>
<
telerikGrid:GridViewTableDefinition
/>
</
telerikGrid:RadGridView.ChildTableDefinitions
>
<
telerikGrid:RadGridView.HierarchyChildTemplate
>
<
DataTemplate
>
<
telerikGrid:RadGridView
x:Name
=
"TelerikProductsGrid"
telerikDragDrop:RadDragAndDropManager.AllowDrop
=
"True"
AutoGenerateColumns
=
"False"
ShowGroupPanel
=
"False"
ItemsSource
=
"{Binding Products}"
>
<
telerikGrid:RadGridView.Columns
>
<
telerikGrid:GridViewDataColumn
DataMemberBinding
=
"{Binding ProductName}"
Width
=
"100"
/>
</
telerikGrid:RadGridView.Columns
>
</
telerikGrid:RadGridView
>
</
DataTemplate
>
</
telerikGrid:RadGridView.HierarchyChildTemplate
>
</
telerikGrid:RadGridView
>
How exactly I register RadDragAndDropManager.AddDropQueryHandler for
TelerikDetailGrid
?When I try in code behind:
RadDragAndDropManager.AddDropQueryHandler(TelerikDetailGrid, RadGridView_OnDropQuery);
I have got error:
Error 1 The name 'TelerikDetailGrid' does not exist in the current context C:\test\MainWindow.xaml.cs 35 55
In other words to add Product to Order by drag and drop? If possible by using multi-select - slecting one or more Product?
thank you