New to Kendo UI for jQuery? Start a free 30-day trial

DataItem

methods

Returns the data item to which the specified tile is bound.

Parameters:tilejQuery|Element|String

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

Returns:kendo.data.Node

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

<div id="treemap"></div>
<script>
$("#treemap").kendoTreeMap({
    dataSource: {
        data: [{
            name: "foo",
            value: 1,
            color: "red",
            id: 1
        }]
    },
    valueField: "value",
    textField: "name",
    colorField: "color"
});

var treemap = $("#treemap").getKendoTreeMap();
var dataItem = treemap.dataItem(".k-treemap-tile:first");
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(dataItem.name); // displays "foo"
</script>
Not finding the help you need?
Contact Support