The dataBound event of the PanelBar does not fire when it is loaded with data through its Items configuration option. This is inconsistent with the behavior of the Kendo UI for jQuery PanelBar and the MVC TreeView, for which the event fires in the same scenario (local data).
Run the following example:
@(Html.Kendo().PanelBar()
.Name("panelbar")
.ExpandMode(PanelBarExpandMode.Single)
.Events(events => events
.DataBound("databound")
)
.Items(panelbar =>
{
panelbar.Add().Text("Root1")
.Expanded(true)
.Items(items =>
{
items.Add().Text("Sub-Item 2.1");
items.Add().Text("Sub-Item 2.2");
});
panelbar.Add().Text("Root2")
.Items(items =>
{
items.Add().Text("Sub-Item 2.1");
items.Add().Text("Sub-Item 2.2");
});
})
)
<script>
function databound(e) {
alert('databound');
}
</script>
The dataBound event does not fire.
The dataBound event fires.