I have a kendo dropdown tree and when I set the datasource after initialization via .setDataSource([...]) it triggers the change event. How do I prevent this from happening? I am setting the datasource with a local javascript array of objects. I saw in another forum post to set the value to an empty array. I tried that but it still triggered the on change event. I'm doing this because I have 2 dropdowntrees (one in a flyout panel and one in the header) that I need to keep in sync.
Here is a dojo demonstrating my issue:
https://dojo.telerik.com/iKoBOVIk/30
Hello Team,
I have run the FastPass on the kendo control present at the below URL and found the a11y issues.
https://demos.telerik.com/kendo-ui/dropdowntree/checkboxes
https://demos.telerik.com/kendo-ui/dropdowntree/index
Please check the below images
On fixing one of the issues(adding aria-label attr) shown in the above image, new a11y issues are coming as shown in the below image.
On fixing the above one as well, new a11y issues are coming,
Please let me know how can we fix this problem?
Thanks & Regards
Karan
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.
When using the MVVM value binding with the DropDownTree, pressing the X button to clear the selection does not clear the bound field in the viewmodel. If the DropDownTree is configured with valuePrimitive=true, then the VM bound field is completely unchanged If the DropDownTree is configured with valuePrimitive=false, then the VM bound field is set to the string value of the prior selection's ID.
So my present workaround is to use valuePrimitive=false and if the VM bound field ends up being a string instead of an object, then treat it as null instead. This adds a bunch of extra and ugly code to my app - is there any way to get the widget to simply set the bound VM field to null when the user clicks the X?
Hi,
I'm tryign to dynamically change the tagMode of a kendo.ui.DropDownTree as a user selects more or less items but the control does not refresh/rerender
Below is a sample of the code I have tried...
var ddt = $(id).data('kendoDropDownTree');
var maxSelectedItemsDisplayedInSingleTagMode = 3;
let selectedValues = ddt.value();
let currentTagMode = ddt.options.tagMode;
let newTagMode = currentTagMode;
newTagMode = selectedValues.length <= maxSelectedItemsDisplayedInSingleTagMode ? "multiple" : "single";
if (newTagMode != currentTagMode) {
ddt.value([])
ddt.setOptions({
tagMode: newTagMode
});
ddt.value(selectedValues);
}
Something similar does work for the kendo.ui.MultiSelect but I cannot get it to play ball for kendo.ui.DropDownTree
Thanks
Hello There,
I have a similar DropDownTree in my project.
I do not want to use clearButton, I would like to create a button with onClick clear out selected values and also the checkBox selection.
What I have tried: the used selectedIds= [] but on UI the tags stucked there, can not removed at all.
Thanks for your help!
Cheers,
Peter
$("#dropdowntree").kendoDropDownTree({
dataSource: {
type: "aspnetmvc-ajax",
transport: {
read: { url: "xxxxxxxxxxxxxxxxxxxxxxxxxxx" , data: forgeryToken, dataType: "json" }
}}
thank you
Hello!
I wonder if there is a possibility to create an option ala "select all", but customize it to selecting only second-level nodes or nodes with specified ids?
I'm using a dropdowntree editor on a grid column. The bound field is a list of objects.
Ex. I would not want 18' checked here, just the two children on the 2nd level:
Editor:
function equipmentEditor(container, options) {
let ds = new kendo.data.HierarchicalDataSource({
data: _equipmentTypes,
schema: {
model: {
children: "Items"
},
},
});
$("<input data-bind='value: EquipmentTypes'/>")
.attr("name", options.field)
.appendTo(container)
.kendoDropDownTree({
checkboxes: {
checkChildren: true
},
checkAll: true,
autoWidth: true,
dataTextField: "Description",
dataValueField: "Code",
dataSource: ds,
autoClose: false,
tagMode: "single",
});
_equipmentTypes data used in dataSource:
[
Posted object:
"EquipmentTypes": [
{
"Code": "17'",
"Description": "17'",
"Items": [
{
"Code": "T17.DUMP",
"Description": "17' Dump Trailer",
"Items": [],
"id": "",
"index": 0,
"checked": true,
"_level": 1,
"_tagUid": "b13353ee-cbd3-4226-8b4c-080d4ea775e4"
}
],
"index": 0,
"expanded": true,
"checked": true,
"_level": 0,
"_tagUid": "c0785273-c8bd-4a18-8598-de5d7ba6c16e"
},
{
"Code": "T17.DUMP",
"Description": "17' Dump Trailer",
"Items": [],
"id": "",
"index": 0,
"checked": true,
"_level": 1,
"_tagUid": "b13353ee-cbd3-4226-8b4c-080d4ea775e4"
}
],