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

EnableDragToReorder for tabs created through client side api

1 Answer 31 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Kiran
Top achievements
Rank 1
Kiran asked on 07 Nov 2012, 01:12 PM
Hi,

We are creating tabs on our using client side api of tab strip. We have set EnableDragToReorder for this tabstrip. However we are not able to reorder tabs using drag and drop mechanism. We are able to reorder tabs if they are predefined but it doesnt work dynamically generated tabs. Events like onclienttabdragstart, onclientreordering are also not generated in this case.

Please let us know if we need to do something different to achieve reordering of dynamically generated tabs ?

Regards,
Kiran

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar Terziev
Telerik team
answered on 09 Nov 2012, 11:51 AM
Hello Kiran,

You are right that if there are no tabs initially defined the drag-to-reoder functionality is not working. This is caused by the fact that the Dom element containing the tabs is not yet created since there are no tabs. In order to overcome this problem you should invoke the _attachDragToReorderHandler method after the first tab is created and added to the tabstrip. Please note that this should be done only once and only after the first tab is added. Here is a sample implementation:
var tabstrip = $find("RadTabStrip1");
tabstrip._attachDragToReorderHandler();


Kind regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TabStrip
Asked by
Kiran
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or