EnableDragToReorder for tabs created through client side api

2 posts, 1 answers
  1. Kiran
    Kiran avatar
    4 posts
    Member since:
    Sep 2011

    Posted 07 Nov 2012 Link to this post


    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 ?

  2. Answer
    Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 09 Nov 2012 Link to this post

    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");

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top