Return node by id of the record.
Parameters
Name | Type | Description |
---|---|---|
id | {string} | The id of the node that needs to be returned |
Examples
sample
<div id="tree"></div>
<script>
var tree = $('#tree').tree({
dataSource: '/Locations/Get',
primaryKey: 'id' //define the name of the column that you want to use as ID here.
});
tree.on('dataBound', function() {
var node = tree.getNodeById('1');
node.css('background-color', 'red');
});
</script>