Rename selected Kendo PanelBar

120 views Asked by At

How would you rename the currently selected PanelBar. I have a select function that works, this method removes the selected panelBar

panelbar.remove(panelbar.select());

This method renames the first PanelBar

panelbar.wrapper.find(".k-header:first").text("foo")

Tried with no joy

panelbar.wrapper.find(panelbar.select().text("New Text"));
panelbar.wrapper.find(panelbar.select()(".k-header").text("New Text"));

Thank you

1

There are 1 answers

0
ASG On BEST ANSWER

Within your fuction

panelbar.select().find("> .k-link").text("New Text");

Here's a Dojo http://dojo.telerik.com/EDekO/2

You could do it using the select event e.g.

 @(Html.Kendo().PanelBar()
.Name("panelbar")
.Events(events => events.Select("onSelect"))

Then your onSelect function

function onSelect(e) {
   $(e.item).find("> .k-link").text("New Text");
}