I was trying to implement Kendodropdowntree , I came across following situation which I am not able to understand
$(dropdowntree).kendoDropDownTree({
placeholder: "Select ...",
height: "auto",
dataSource: //HARD CODED VALUE GOES HERE
});
}
Above example will work fine when , I hard code those datasource values. When I try to pass some variable there it will not work
var datatobind= somedata // data in exact format it is expected
{
$(dropdowntree).kendoDropDownTree({
placeholder: "Select ...",
height: "auto",
dataSource: datatobind
});
}
Even I tried passing variable of following type
var dataSourcetype = new kendo.data.HierarchicalDataSource({
data: datatobind
});
{
$(dropdowntree).kendoDropDownTree({
placeholder: "Select ...",
height: "auto",
dataSource: dataSourcetype.options.data
});
}
But even above also doesn't solve problem, I am not able to get it , why passing exact same variable is not binding to data source.
I've implemented the example code found here: https://demos.telerik.com/kendo-ui/treeview/filter-treeview-in-dialog
It works as expected and is perfect for my requirements, apart from one annoyance.
When the filter is in use some child nodes are hidden, but if you click the parent node checkbox, the result is that all child nodes are checked. Irrespective of what is visible (filtered).
This isn't very useful. Is there a solution whereby only the visible children would be checked/unchecked when the parent checkbox is clicked?
Thanks,
John
Hi Team,
I am using file manager and I wanted to sort tree view elements in file manager based on some custom logic. Now by default it is sorting based on name. Is there any way to implement custom sorting?
Hello,
I am trying to bind my treeview to a datasource provided by a controller function, using two examples provided by Telerik, on the web site and at the demos project. My goal is to use the script call from used in one demo with the controller data source used in the other, but I am not being able to do it.
This is the script code:
<script>
var serviceRoot = "https://demos.telerik.com/kendo-ui/service";
homogeneous = new kendo.data.HierarchicalDataSource({
transport: {
read: {
url: "api/Servicos/Employees",
dataType: "jsonp"
}
},
schema: {
model: {
id: "SetorId",
hasChildren: "hasChildren"
}
}
});
$("#treeview").kendoTreeView({
dataSource: homogeneous,
dataTextField: "Nome"
});
</script>
And this is the Controller code:
[Route("Employees")] [HttpGet] public JsonResult Employees() { var result = _unitOfWork.SetorSolicitante.GetAll(); { var employees = from e in result select new { id = e.SetorSolicitanteId, Name = e.Nome, hasChildren = (from q in _unitOfWork.SetorSolicitante.GetAll() where (q.SetorPaiId == e.SetorSolicitanteId) select q ).Count() > 0 }; return new JsonResult(employees.ToList()); } }
My table references itself, where SetorPaiId indicates if the SetorId is a child of it.
Could I get some assistance on that issue?
Regards,
Alexandre
function onSelectNode( e )
{
var dataItem = this.dataItem( e.node );
dataItem.imageUrl = "someImage.png";
]
I am looking to use the treeview to show the contents of an s3 bucket.
Along with the filename, I would like to show the size and also the date modified
Hi All,
I need to create a dropdownlist & kendoTreeList inside a kendo grid even though the grid is not set to edit mode.
User should be able to select the value from the dropdown list & the kendo Treelist.
kindly give me the approach to implement this.
please share me the links of any examples .
Thanks in advance. :)