Hello,
I am using the HierarchicalDataSource to bind data to my tree.
I would like to set a node selected when the data is returned from the server on the initial load.
I am currently trying the following.
Please note: in the initialization of tree, I am trying the set the attribute "selected" to the value of a property in my model object.
Is this possible, what I am trying to achieve?
I am using the HierarchicalDataSource to bind data to my tree.
I would like to set a node selected when the data is returned from the server on the initial load.
I am currently trying the following.
Please note: in the initialization of tree, I am trying the set the attribute "selected" to the value of a property in my model object.
data =
new
kendo.data.HierarchicalDataSource({
transport: {
read: {
url:
"/Controller/Action"
,
dataType:
"json"
}
},
schema: {
model: {
id:
"Id"
,
hasChildren:
"HasChildren"
}
}
});
$(
"#tree"
).kendoTreeView({
dataSource: data,
dataTextField:
"Alias"
,
selected:
"Selected"
});
Is this possible, what I am trying to achieve?