Change the Text of Item of KendoPanelBar

1k views Asked by At

I have asp.net web application having Kendo Controls. i have added KendoPanel having three Panelbar Items..

I want to change the Header text of second Item of PanelBar on the button click event..

how can i achieve this ?

Thanks

1

There are 1 answers

0
OnaBai On

Assuming that this is you panel bar definition:

var panelbar = $("#panelbar").kendoPanelBar({
     ...
}).data("kendoPanelBar");

And this you button handler:

$("#change_2").on("click", function() {
    // Get reference to the second "li" and then to the header
    var li = panelbar.wrapper.find("> li:nth(1) span.k-link.k-header");
    // Replace the content by "Title"
    li.contents().first().replaceWith("Title");
});

You can see it here : http://dojo.telerik.com/@OnaBai/Uzugu