This is a migrated thread and some comments may be shown as answers.

Draog drop of Tabs

2 Answers 58 Views
Tabstrip (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nitesh
Top achievements
Rank 1
Nitesh asked on 22 Oct 2010, 12:25 PM
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 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 22 Oct 2010, 04:39 PM
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()
    {
        InitializeComponent();
 
        var tabStrip = new RadTabStrip();
        var tabItem = new TabItem("asd");
        tabStrip.Items.Add(tabItem);
        tabItem = new TabItem("asd1");
        tabStrip.Items.Add(tabItem);
        tabItem = new TabItem("asd2");
        tabStrip.Items.Add(tabItem);
        tabItem = new TabItem("asd3");
        tabStrip.Items.Add(tabItem);
        tabStrip.Dock = DockStyle.Fill;
        this.Controls.Add(tabStrip);
        tabStrip.AllowDragDrop = false;
    }
}

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

Best Regards,
Emanuel Varga
0
Nikolay
Telerik team
answered on 26 Oct 2010, 03:55 PM
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,
Nikolay
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
Tags
Tabstrip (obsolete as of Q2 2010)
Asked by
Nitesh
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or