dataItem

Returns the data item to which the specified item is bound. The method will return an item only when the PanelBar is populated using a DataSource.

Parameters

node jQuery|Element|String

A string, DOM element or jQuery object which represents the item. A string is treated as a jQuery selector.

Returns

kendo.data.Node The model of the item that was passed as a parameter.

Example - get the data item of the first node

<ul id="panelBar"></ul>
<script>
    $("#panelBar").kendoPanelBar({
        dataSource: [
            { id: 1, text: "foo" },
            { id: 2, text: "bar" }
        ]
    });

    var panelBar = $("#panelBar").data("kendoPanelBar");
    var dataItem = panelBar.dataItem(".k-panelbar-item:first");
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(dataItem.text); // displays "foo"
</script>
In this article