Return node data by text.
Parameters
Name | Type | Description |
---|---|---|
text | {string} | The text of the record that needs to be returned |
Examples
sample
<button id="btnGetData" class="gj-button-md">Get Data</button>
<br/>
<div id="tree"></div>
<script>
var tree = $('#tree').tree({
dataSource: '/Locations/Get',
});
$('#btnGetData').on('click', function () {
var data = tree.getDataByText('California');
alert('The population of California is ' + data.population);
});
</script>