Cameron Molyneux
Top achievements
Rank 1
Cameron Molyneux
asked on 04 Mar 2010, 08:37 PM
I am trying to drag drop from a gridview to another control ,, this works okay but if the grid has a scrollbar that i want to scroll it initiases a drag drop rather than letting me scroll
this makes scrolling difficult .. even more difficult with the 'thin' scroll bar you get when you apply the windows 7 theme
this makes scrolling difficult .. even more difficult with the 'thin' scroll bar you get when you apply the windows 7 theme
6 Answers, 1 is accepted
0
Hi Cameron Molyneux,
It seems that you are making the whole grid draggable (AllowDrag="true"). If you set this property on the individual rows the drag should not start when the mouse is over he scrollbar.
Your handlers will remain almost the same since you are handling routed events.
I can suggest setting the AllowDrag property using a row style.
Do you think this will work for you?
Best wishes,
Miroslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
It seems that you are making the whole grid draggable (AllowDrag="true"). If you set this property on the individual rows the drag should not start when the mouse is over he scrollbar.
Your handlers will remain almost the same since you are handling routed events.
I can suggest setting the AllowDrag property using a row style.
Do you think this will work for you?
Best wishes,
Miroslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Cameron Molyneux
Top achievements
Rank 1
answered on 12 May 2010, 01:59 PM
Sorry I have only just got back to this
Can you supply an example of this as I don't understand how to use the row style
many thanks
Can you supply an example of this as I don't understand how to use the row style
many thanks
0
Hi Cameron Molyneux,
You can set the RadDragAndDropManager.AllowDrag property on the individual rows, like so:
Give it a try and let us know fi it works for you.
Greetings,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
You can set the RadDragAndDropManager.AllowDrag property on the individual rows, like so:
<
telerikGrid:RadGridView
x:Name
=
"radGridView1"
ScrollViewer.HorizontalScrollBarVisibility
=
"Auto"
IsReadOnly
=
"False"
Style
=
"{DynamicResource RadGridCellStyle}"
>
<
telerikGrid:RadGridView.RowStyle
>
<
Style
TargetType
=
"{x:Type telerikGridView:GridViewRow}"
>
<
Setter
Property
=
"telerikDragDrop:RadDragAndDropManager.AllowDrag"
Value
=
"True"
/>
</
Style
>
</
telerikGrid:RadGridView.RowStyle
>
</
telerikGrid:RadGridView
>
Give it a try and let us know fi it works for you.
Greetings,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Cameron Molyneux
Top achievements
Rank 1
answered on 12 May 2010, 02:23 PM
thanks but i'm also trying to impliment this in WPF but cant .. can you post the wpf version too
(sorry to be a pain!)
(sorry to be a pain!)
0
Cameron Molyneux
Top achievements
Rank 1
answered on 12 May 2010, 02:44 PM
<telerik:RadGridView x:Name="selectableOrdersGrid" Margin="0" |
d:LayoutOverrides="Width" EditTriggers="None" |
RowIndicatorVisibility="Collapsed" |
AutoGenerateColumns="False" CanUserFreezeColumns="False" |
CanUserReorderColumns="False" CanUserResizeColumns="False" |
CanUserSortColumns="False" ShowGroupPanel="False" Grid.Row="1" |
MouseDoubleClick="selectableOrdersGrid_MouseDoubleClick" |
Style="{DynamicResource RadGridCellStyle}"> |
<telerik:RadGridView.RowStyle> |
<Style TargetType="{x:Type telerik:GridViewRow}"> |
<Setter Property="telerik:GridViewRow.AllowDrop" Value="True" /> |
</Style> |
</telerik:RadGridView.RowStyle> |
</telerik:RadGridView> |
The above code compiles as I have used Allow Drop ...
If i try to use AllowDrag it complains saying cant find the Style Property AllowDrag
0
Cameron Molyneux
Top achievements
Rank 1
answered on 12 May 2010, 04:10 PM
please ignore .. i implemented your example fix incorrectly .. when i implemented it correctly it worked :)