Draog drop of Tabs

Thread is closed for posting
3 posts, 0 answers
  1. Nitesh
    Nitesh avatar
    4 posts
    Member since:
    Aug 2010

    Posted 22 Oct 2010 Link to this post

    Hi Guys,

    I am using the document tab strip within which I have 2 tabs.The requirement is that the user cannot swap the tabs.
    I prevented that by setting AllowDragDrop=false for the document tabstrip.
    However when the user drags a tab, the tabstrip hints where the drop will appear by showing visual pointers in between tabs.How do I prevent  this scenario.

    Any help would be appreciated.
    I am using Visual studio 2008.
  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 22 Oct 2010 Link to this post

    Hello Nitesh,

    The drag and drop operation is only performed if AllowDragDrop property is set to true, please try putting a breakpoint in your application and check the state of the AllowDragDrop property. For more information please take a look at this help article.

    Or please test the following example and let me know if you are noticing similar behavior:
    using System.Windows.Forms;
    using Telerik.WinControls.UI;
    public partial class Form1 : Form
        public Form1()
            var tabStrip = new RadTabStrip();
            var tabItem = new TabItem("asd");
            tabItem = new TabItem("asd1");
            tabItem = new TabItem("asd2");
            tabItem = new TabItem("asd3");
            tabStrip.Dock = DockStyle.Fill;
            tabStrip.AllowDragDrop = false;

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga
  3. Nikolay
    Nikolay avatar
    1805 posts

    Posted 26 Oct 2010 Link to this post

    Hi Nitesh,

    Thank you for the screenshots you have provided in your support ticket. They allowed me to understand your case.

    In order to cancel the drag operation in RadDock, you should handle the Starting event of the DragDropService and set the Cancel property of the event arguments to true:
    DragDropService service = this.radDock1.GetService<DragDropService>();
    service.Starting += new StateServiceStartingEventHandler(service_Starting);
    void service_Starting(object sender, StateServiceStartingEventArgs e)
        e.Cancel = true;

    I hope this helps.

    All the best,
    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
Back to Top