findByUid
Returns the Menu item by the dataItem's uid.
Example
<ul id="menu"></ul>
<script>
var dataSource = new kendo.data.HierarchicalDataSource({
transport: {
read: {
url: "https://demos.telerik.com/kendo-ui/service/Employees",
dataType: "jsonp"
}
},
schema: {
model: {
id: "EmployeeId",
hasChildren: "HasEmployees"
}
}
});
var menu = $("#menu").kendoMenu({
dataTextField: "FullName",
dataSource: dataSource
}).data("kendoMenu");
menu.one("dataBound", function (ev) {
var firstItemUid = menu.dataSource.at(0).uid;
var item = menu.findByUid(firstItemUid);
menu.open(item);
});
</script>
Parameters
uid String
The uid of the data item.
Returns
jQuery
the item found.