Hello,
I believe I've copied all the necessary code and settings from the ReorderRows example; however the drop is never enabled. I'm using the DropIndicationDetails and RowReorderBehavior classes with no changes. The code in my UserControl is as follows (only pertinent snippet is included)...
Any help would be much appreciated.
Thanks in advance,
Steve
I believe I've copied all the necessary code and settings from the ReorderRows example; however the drop is never enabled. I'm using the DropIndicationDetails and RowReorderBehavior classes with no changes. The code in my UserControl is as follows (only pertinent snippet is included)...
<
UserControl.Resources
>
<
ResourceDictionary
>
<
ResourceDictionary.MergedDictionaries
>
<
ResourceDictionary
Source="/AM.Core;Component/UI/ResourceDictionaries/UID
<ResourceDictionary Source="/AM.Core;Component/UI/ResourceDictionaries/Dat
</ResourceDictionary.MergedDictionaries>
<
localProperties:Settings
x:Key
=
"Settings"
/>
<
Style
TargetType
=
"telerik:GridViewRow"
x:Key
=
"DraggedRowStyle"
BasedOn
=
"{StaticResource {x:Type telerik:GridViewRow}}"
>
<
Setter
Property
=
"telerik:DragDropManager.AllowDrag"
Value
=
"True"
/>
<
Setter
Property
=
"AllowDrop"
Value
=
"True"
/>
</
Style
>
</
ResourceDictionary
>
</
UserControl.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
>
<
telerik:RadGridView
x:Name
=
"AccountGroupsGridView"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
Width
=
"{Binding ElementName=LayoutRoot, Path=ActualWidth}"
Height
=
"{Binding ElementName=LayoutRoot, Path=ActualHeight}"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
ScrollViewer.HorizontalScrollBarVisibility
=
"Auto"
IsSynchronizedWithCurrentItem
=
"True"
AutoGenerateColumns
=
"False"
VerticalGridLinesBrush
=
"Transparent"
AlternationCount
=
"2"
AlternateRowBackground
=
"AliceBlue"
CanUserDeleteRows
=
"True"
CanUserInsertRows
=
"True"
ColumnWidth
=
"*"
ShowGroupPanel
=
"False"
RowIndicatorVisibility
=
"Collapsed"
KeyboardNavigation.DirectionalNavigation
=
"Cycle"
KeyboardNavigation.TabNavigation
=
"Cycle"
ItemsSource
=
"{Binding Path=AccountGroups}"
RowStyle
=
"{StaticResource DraggedRowStyle}"
AllowDrop
=
"True"
amUI:RowReorderBehavior.IsEnabled
=
"True"
>
<
telerik:RadGridView.Resources
>
<
DataTemplate
x:Key
=
"DraggedItemTemplate"
>
<
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"Dragging:"
/>
<
TextBlock
Text
=
"{Binding CurrentDraggedItem}"
FontWeight
=
"Bold"
/>
</
StackPanel
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding CurrentDropPosition}"
FontWeight
=
"Bold"
MinWidth
=
"45"
/>
<
TextBlock
Text
=
", ("
Foreground
=
"Gray"
/>
<
TextBlock
Text
=
"{Binding CurrentDraggedOverItem}"
/>
<
TextBlock
Text
=
")"
Foreground
=
"Gray"
/>
</
StackPanel
>
</
StackPanel
>
</
DataTemplate
>
</
telerik:RadGridView.Resources
>
Any help would be much appreciated.
Thanks in advance,
Steve