Skip to content

Commit c7d56e9

Browse files
authored
Update navigationview-drag-drop-customize.md
1 parent 6b19d25 commit c7d56e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

knowledge-base/navigationview-drag-drop-customize.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ ticketid: 1691649
1616

1717
## Description
1818

19-
I am dynamically adding pages to the [RadNavigationView](https://docs.telerik.com/devtools/winforms/controls/navigationview/overview) control. I want users to reorder pages by dragging and dropping them without creating nested pages. All pages should remain in a single level. Additionally, I need a footer page pinned to the bottom that cannot be dragged or have other pages dropped below it or into it.
19+
By default, the RadNavigationView control allows you to reorder the navigation view items according to your preferences. The drag-drop behavior of the RadNavigationView control is achieved by the RadPageViewDragDropService, which can be accessed by the RadNavigationView1.NavigationViewElement.ItemDragService property. If customization is required, we will need to create a custom class that derives from RadPageViewDragDropService and override the methods of the drag-drop service.
20+
21+
In the following scenario, the drag-drop should be performed on the first level only, thus disabling the option to have nested drag-drop. Also, the footer item should not be draggable.
2022

2123
## Solution
2224

@@ -26,6 +28,7 @@ To achieve this, create a custom drag-and-drop service and override specific met
2628
Implement a custom class that derives from `RadPageViewDragDropService`. Override the `CanDragOver` method to restrict drop positions and prevent nested pages.
2729

2830
````C#
31+
2932
public class CustomDragDropService : RadPageViewDragDropService
3033
{
3134
public CustomDragDropService(RadPageViewElement owner) : base(owner)

0 commit comments

Comments
 (0)