3 Answers, 1 is accepted
0
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.
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
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
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:
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.
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.