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

How to add effect for Action ReOrder of RadTabControl

3 Answers 62 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Thanh TV
Top achievements
Rank 1
Thanh TV asked on 04 Dec 2009, 02:22 PM
HI Telerik!

How to add effect for action ReOrder of RadTabControl?

Thanks!

3 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 04 Dec 2009, 03:29 PM
Hi Thanh,

Thank you for your feedback. Currently reordering works as shown in the Tab Reorder example of RadTabControl. We are planning to add smooth tab reordering, but I cannot bind to a specific date, so stay tuned for updates. Let me know if you have additional questions.

Sincerely yours,
Kiril Stanoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Nathan
Top achievements
Rank 2
answered on 18 Feb 2010, 09:40 PM
Hi,

I'm looking for an event so that I know the updated layout of the tabs when allowing drag reordering. Something such as "TabOrderChanged" on the tabcontrol or "IndexChanged" on the tabitems themselves?
I can't seem to find any of these events that I can respond to - am I missing something?

Thanks,

Nathan
0
Miroslav
Telerik team
answered on 23 Feb 2010, 06:41 PM
Hi Nathan,

No, you are correct that such an events do not exist.

Reordering is done by adding and removing the dragged item from the items collection of the TabControl.

There are two ways to be notified about the drag reorder:
1. Inherit the TabCotnrol and override the OnItemsChanged method. In this case distinguishing between other items modifications and the drag reorder may be difficult.

2. Handle the DropQuery event and check for the following conditions which show that a tab has been reordered:

private void OnTabControlDropQuery(object sender, DragDropQueryEventArgs e)
{
    // A handled event, possibly coming from the TabControl:
    if (e.Options.Source is RadTabItem
        && e.Options.Source != e.Options.Destination
        && e.Options.Payload is RadTabItem)
    {
        // A reordering has just occurred, the e.Options.Source is 
        // now in the place of the e.Options.Destination
    }
}

I am attaching a sample project that demonstrates this.

Hopefully this will work for you.

Regards,
Miroslav
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
TabControl
Asked by
Thanh TV
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Nathan
Top achievements
Rank 2
Miroslav
Telerik team
Share this question
or