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
3 Answers, 1 is accepted
0
Alexander Valchev
Telerik team
answered on 03 Sep 2012, 09:07 AM
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!
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
0
Atanas Korchev
Telerik team
answered on 24 Dec 2012, 11:52 AM
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>