Immediate ItemDragMode in RadNavigationView

1 Answer 72 Views
NavigationView PageView
ASM
Top achievements
Rank 1
Iron
Iron
ASM asked on 09 Feb 2023, 07:52 AM

Hello,

I've been trying to enable drag and drop functionality so that the user can sort the RadNavigationView menu items, and it works when the ItemDragMode property is set to Preview, but does nothing when it's set to Immediate, then there's no drag and drop at all, the functionality seems to be disabled.

c.ViewElement.ItemDragMode = PageViewItemDragMode.Immediate

I'm not sure if I'm doing something wrong, or if this is the intended behaviour (so the immediate mode it's not a supported feature), or if it's just a bug.

Thanks

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Feb 2023, 03:07 PM

Hello, Armand, 

RadNavigationView actually represents a RadPageView with already applied ViewMode to NavigationView. The whole API that is available for the PageViewMode.NavigationView is also valid for RadNavigationView. 

The following code snippet demonstrates how to start the service for RadNavigationView:

        public RadForm1()
        {
            InitializeComponent();

            this.radNavigationView1.ViewElement.ItemDragMode = PageViewItemDragMode.Immediate;
            this.radNavigationView1.ViewElement.ItemDragService.PreviewDragStart += ItemDragService_PreviewDragStart;
        }

        private void ItemDragService_PreviewDragStart(object sender, PreviewDragStartEventArgs e)
        {
            e.CanStart = true;
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
NavigationView PageView
Asked by
ASM
Top achievements
Rank 1
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or