How to enable/disable tabstrip tab in angular

5 posts, 0 answers
  1. Mongonv
    Mongonv avatar
    10 posts
    Member since:
    Nov 2005

    Posted 06 Jul 2015 Link to this post

    Hey all,

    I know this is probably super simple, but I have not been able to find how to enable/disable tabs from within the angular controller (not jquery) for a tabstrip in angular.

     Can someone point me to a sample on how to do this?

     Thanks

  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 08 Jul 2015 Link to this post

    Hello,

     

    the tabstrip does not expose any bindable properties to enable/disable tabs with angular. This being said, you can export the widget object to the controller scope and use its methods from there.

     

    Regards,
    Petyo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Mongonv
    Mongonv avatar
    10 posts
    Member since:
    Nov 2005

    Posted 08 Jul 2015 in reply to Petyo Link to this post

    Thanks for that, that makes sense on getting the object.

     I am still trying to figure out how to identify the specific tab though.  If I have 7 tabs and the user is on tab 5, how do I know that tab's ID?  

     All I have been able to figure out so far is getting the tab's value() which seems to be the displayed text, but that can be problematic to use when it may be a dynamically generated value for showing on the tab.

    In other libs we have used, the tabs had an index value and it seems that there is something like that from the example I have been looking thru, that is when iterating thru the children of the tabstrip, not for referencing the specific tab by some ID type of value.

    Any info on this would be really appreciated.

    Thanks

  5. Plamen Lazarov
    Admin
    Plamen Lazarov avatar
    135 posts

    Posted 10 Jul 2015 Link to this post

    Hello,

    In order to get the ID of the selected item you could use the select event of the widget. For your convenience I prepared a simple demo - please check and let me know if it helps. 

    http://dojo.telerik.com/OhIgI/4

     

    Regards,
    Plamen Lazarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Mongonv
    Mongonv avatar
    10 posts
    Member since:
    Nov 2005

    Posted 10 Jul 2015 in reply to Plamen Lazarov Link to this post

    Hey Plamen,

    Thanks for the example, its always the simple stuff that consumes all the time in getting going in a new platform.

    Great example, shows how your platform expects the ID to be managed.

    Have a great weekend

Back to Top
Kendo UI is VS 2017 Ready