Replace Tab HTML

4 posts, 0 answers
  1. Simon
    Simon avatar
    159 posts
    Member since:
    Sep 2010

    Posted 29 Aug 2012 Link to this post

    Hello,

    Is there a way to replace Tab's HTML?  So far, the only solution I have is to remove the existing tab and then create a new tab with the updated HTML.

    Best regards,

    Simon
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 03 Sep 2012 Link to this post

    Hi Simon,

    You could use the contentElement method of the widget to get the tab content DOM element and jQuery.html method to replace its inner html. As an example:


    Regards,
    Alexander Valchev
    the Telerik team
    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. Lee
    Lee avatar
    37 posts
    Member since:
    Oct 2012

    Posted 19 Dec 2012 Link to this post

    How would you go about adding custom icons/sprites to this example?

    I have only seen examples (on web control) using DataSource and 'dataSpriteCssClass' property...And in this fashion I am unsure of how to go about getting my complex content into the DataSoruce element's 'content' property...

    If possible, I'd be interested in seeing how to implement custom icons with complex (more than just a text value, some HTML) content when initializing the TabStrip from a DataSource and also, when initializing from HTML (divs)...


    Thanks in advance!

    - Lee
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 24 Dec 2012 Link to this post

    Hi Lee,

     You just need to include the sprite/image html in the tab:

    <li><span class="k-sprite sprite-classname"></span>This is a tab with a sprite</li>
    <li><img src="image_url">This is a tab with an image</li>


    Here is a live demo: http://jsbin.com/ozuwub/1/edit

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready