Hi Kamlesh,
Yes, it is possible to implement drag-drop between different controls. Unfortunately the GridView is currently in CTP status, which means that some of the functionality is not there yet.
What you need to do is set the AllowDrag property of the grid rows to true and the AllowDrop property of the TreeView items to true.
The following code should work in the near future (though unfortunately not now):
<Grid> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="*" /> |
<ColumnDefinition Width="3*" /> |
</Grid.ColumnDefinitions> |
|
<nav:RadTreeView x:Name="treeView"> |
<nav:RadTreeView.ItemContainerStyle> |
<Style TargetType="nav:RadTreeViewItem"> |
<Setter Property="dragDrop:RadDragAndDropManager.AllowDrop" Value="True" /> |
<Setter Property="Foreground" Value="Red" /> |
</Style> |
</nav:RadTreeView.ItemContainerStyle> |
</nav:RadTreeView> |
|
<grid:RadGridView x:Name="gridView" Grid.Column="1"> |
<grid:RadGridView.RowAppearance> |
<grid:RowAppearanceSettings> |
<grid:RowAppearanceSettings.RowStyle> |
<Style TargetType="gridView:GridViewRow"> |
<Setter Property="dragDrop:RadDragAndDropManager.AllowDrag" Value="True" /> |
<Setter Property="Foreground" Value="Red" /> |
</Style> |
</grid:RowAppearanceSettings.RowStyle> |
</grid:RowAppearanceSettings> |
</grid:RadGridView.RowAppearance> |
</grid:RadGridView> |
</Grid> |
You can set the attached properties in code as well, but again I am afraid this option is not available for the Silverlight grid view.
Afterwards you will need to handle the routed drag/drop events as you would normally do.
Greetings,
Miroslav
the Telerik team
Check out
Telerik Trainer, the state of the art learning tool for Telerik products.