After wrestling with this for a while and doing lots of research I have not been able to find a definitive answer. I can find a myriad of examples about drag and drop between other controls and the RadGridView but little to no examples about dragging from or between these types of controls. Searching back it seems that this is a hot topic for the past two years with solutions that temporarily worked or didn't at all. I'd like to say that I've tried harder for a solution but simply don't know how at this point. I've usually had wonderful success with the RadDragAndDropManager and all has been simple and easy except in this case. I just want to be able to drag a row from one RadGridView to another using the standard RadDragAndDropManager methods.
My main issue at this point is that I can't get a row to drag at all. I've tried applying a style to my GridView's RowStyle and to my column's CellStyle that sets the telerik:RadDragAndDropManager.AllowDrag to true but nothing happens. Strangely enough if I set telerik:DragDropManager.AllowDrag equal to true I get some dragging ability but it always says I have an invalid drop target by showing the crossed out circle curser.
Below is a simple application that I think should work but doesn't. I haven't bothered to set the drop properties yet. Please give me some pointers or an example that I can study to know what to do on this that is relevant to .NET 4.0 and recent releases. I am currently using the latest internal build as of 9/12/2011.
Thanks,
Adam
My main issue at this point is that I can't get a row to drag at all. I've tried applying a style to my GridView's RowStyle and to my column's CellStyle that sets the telerik:RadDragAndDropManager.AllowDrag to true but nothing happens. Strangely enough if I set telerik:DragDropManager.AllowDrag equal to true I get some dragging ability but it always says I have an invalid drop target by showing the crossed out circle curser.
Below is a simple application that I think should work but doesn't. I haven't bothered to set the drop properties yet. Please give me some pointers or an example that I can study to know what to do on this that is relevant to .NET 4.0 and recent releases. I am currently using the latest internal build as of 9/12/2011.
Thanks,
Adam
<
Window
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:d
=
"http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc
=
"http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable
=
"d"
x:Class
=
"RadGridView_DragAndDropTest.MainWindow"
x:Name
=
"Window"
Title
=
"MainWindow"
Width
=
"640"
Height
=
"480"
>
<
Window.Resources
>
<
Style
TargetType
=
"telerik:GridViewRow"
>
<
Setter
Property
=
"telerik:RadDragAndDropManager.AllowDrag"
Value
=
"True"
/>
</
Style
>
</
Window.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"0.45*"
/>
<
ColumnDefinition
Width
=
"0.1*"
/>
<
ColumnDefinition
Width
=
"0.45*"
/>
</
Grid.ColumnDefinitions
>
<
telerik:RadGridView
HorizontalAlignment
=
"Right"
Width
=
"280.8"
ShowGroupPanel
=
"False"
SelectionMode
=
"Extended"
AutoGenerateColumns
=
"False"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
ColumnWidth
=
"*"
DataContext
=
"{Binding Source={StaticResource SampleDataSource}}"
ItemsSource
=
"{Binding Collection}"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Property1}"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
<
telerik:RadGridView
Grid.Column
=
"2"
d:LayoutOverrides
=
"Width, Height"
ShowGroupPanel
=
"False"
SelectionMode
=
"Extended"
AutoGenerateColumns
=
"False"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
ColumnWidth
=
"*"
DataContext
=
"{Binding Source={StaticResource SampleDataSource1}}"
ItemsSource
=
"{Binding Collection}"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Property1}"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
Grid
>
</
Window
>