Unplanned
Last Updated: 15 Feb 2022 16:29 by Kevin
Kevin
Created on: 15 Feb 2022 16:29
Category: PanelBar
Type: Bug Report
0
The PanelBar's dataBound event does not fire when loading data using the Items collection

Bug report

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).

Reproduction of the problem

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>

Current behavior

The dataBound event does not fire.

Expected/desired behavior

The dataBound event fires.

Environment

  • Kendo UI version: 2022.1.119
  • jQuery version: x.y
  • Browser: [all]
0 comments