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

FindByUid

methods

Searches for an item with the given unique identifier. Applicable when the widget is bound to a HierarchicalDataSource. If you want to find an item by its id, use the dataSource.get() method and supply its uid to the findByUid method.

Parameters:textString

The text that is being searched for.

Returns:jQuery

All nodes that have the text.

<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 fooDataItem = treemap.dataSource.get(1);
var fooElement = treemap.findByUid(fooDataItem.uid);
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(fooElement);
</script>
Not finding the help you need?
Contact Support