In TreeView control checkboxes.checkChildren property is set to false. If you select children checkboxes, the parent checkbox is selected automatically. It works this way regardless of the checkChildren property is set to true or false.
What I would like is just a "simple" behavior of the control without dependencies between parent and child nodes, i.e. if a checkbox is checked, nothing should happen with other checkboxes.
For example, on the screenshot1, if "Job" checkbox is selected, "Test by w_admin" should not be selected automatically.
KendoUI: 2012.3.1315
OS: Windows 7
jQuery: 1.7.1
jQueryUI: 1.8.16
$(tree).kendoTreeView({
dataSource:
new
kendo.data.HierarchicalDataSource({
transport: {
read: {
url: groups_api_url,
dataType:
"jsonp"
}
},
schema: {
model: {
id:
"key"
,
hasChildren:
"hasChildren"
}
}
}),
checkboxes: {
checkChildren:
false
},
dataTextField:
"title"
});
For example, on the screenshot1, if "Job" checkbox is selected, "Test by w_admin" should not be selected automatically.
KendoUI: 2012.3.1315
OS: Windows 7
jQuery: 1.7.1
jQueryUI: 1.8.16
6 Answers, 1 is accepted
0
Hello Vladimir,
Alex Gyoshev
the Telerik team
This issue is addressed in the latest internal builds.
Greetings,Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Vladimir
Top achievements
Rank 1
answered on 11 Feb 2013, 02:29 PM
Thanks! When are you planning on releasing it?
0
The fix will be part of the official Q1 release (which should be out in mid-March). Until then, you can download the latest internal builds from your account.
All the best,
Alex Gyoshev
the Telerik team
All the best,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Danny
Top achievements
Rank 1
answered on 18 Feb 2013, 04:45 PM
I have another issue related to the treeview and checkboxes.
I am using a tree and configuring it with checkboxes:false to don't generate checkboxes. Then afterwards I use a template to generate a tree and in the first "column" I add a checkbox.
The problem I am having is one I select one of the nodes and then press space, the checkbox state changes and, first of all, I don't want that I don't know how to avoid that behavior. Second of all, that change doesn't trigger the change event or click event of that checkbox.
I don't want kendo to check/unckeck for me my checkboxes when the user press SPACE. How I avoid this? or how can I add an event handler to detect when my checkbox state change to avoid it.
I have created a fiddle page with a tree to show the problem.
http://jsfiddle.net/jhuesos/KvryQ/3/
In that page, if you click on any checkbox, 2 alerts will be shown (once for the event handler and another for the click handler), but if you select one node and then press SPACE, state of checkbox changes but no event will be trigger.
Any suggestion?
I am using a tree and configuring it with checkboxes:false to don't generate checkboxes. Then afterwards I use a template to generate a tree and in the first "column" I add a checkbox.
The problem I am having is one I select one of the nodes and then press space, the checkbox state changes and, first of all, I don't want that I don't know how to avoid that behavior. Second of all, that change doesn't trigger the change event or click event of that checkbox.
I don't want kendo to check/unckeck for me my checkboxes when the user press SPACE. How I avoid this? or how can I add an event handler to detect when my checkbox state change to avoid it.
I have created a fiddle page with a tree to show the problem.
http://jsfiddle.net/jhuesos/KvryQ/3/
In that page, if you click on any checkbox, 2 alerts will be shown (once for the event handler and another for the click handler), but if you select one node and then press SPACE, state of checkbox changes but no event will be trigger.
Any suggestion?
0
Danny
Top achievements
Rank 1
answered on 18 Feb 2013, 07:02 PM
For version v2012.3.1315
I've been debugging the source code and I found a few things that IMHO shouldn't work like that. I apologize in advance if this issue has been solved in newer version of the code.
In case I set the options of the tree checkboxes : false kendo should NOT try to (un)check any input checkbox inside my tree: if it's something I added manually, I want to be the one who handle them manually.
My tree template contains checkboxes in the node, but only in the "leaf" nodes. So kendo doesn't check if the checkbox belongs to the selected node because it selects using focused.find(":checkbox:first"), which means if the current selected node doesn't contain any checkbox, is going to change the state of one checkbox in one of its children. And if I add a hidden checkbox to trick kendo to change the state of an element non used.
Besides, it changes its state but it doesn't trigger any DOM event (change, click) or modify any attribute (only it's data value).
I created a quick fix (I attached the patch) which checks the component options and if the options.checkboxes === false, it does nothing when user press SPACE in the tree. That's the behavoir I think, IMO, it should be the expected one. And in any case, even if checkboxes is true, it should ONLY select the checkbox generated by kendo, not any other (filtering by classname, data or whatever).
Do you guy(s) agree with me explanation? The behavior I expect, can I count it would be fixed in future versions?
Ah! I don't pretend my patch is the solution for this issue, most likely there will be a better way to achieve the same thing doing it, I am not that familiar with kendo data source, yet.
Cheers,
I've been debugging the source code and I found a few things that IMHO shouldn't work like that. I apologize in advance if this issue has been solved in newer version of the code.
In case I set the options of the tree checkboxes : false kendo should NOT try to (un)check any input checkbox inside my tree: if it's something I added manually, I want to be the one who handle them manually.
My tree template contains checkboxes in the node, but only in the "leaf" nodes. So kendo doesn't check if the checkbox belongs to the selected node because it selects using focused.find(":checkbox:first"), which means if the current selected node doesn't contain any checkbox, is going to change the state of one checkbox in one of its children. And if I add a hidden checkbox to trick kendo to change the state of an element non used.
Besides, it changes its state but it doesn't trigger any DOM event (change, click) or modify any attribute (only it's data value).
I created a quick fix (I attached the patch) which checks the component options and if the options.checkboxes === false, it does nothing when user press SPACE in the tree. That's the behavoir I think, IMO, it should be the expected one. And in any case, even if checkboxes is true, it should ONLY select the checkbox generated by kendo, not any other (filtering by classname, data or whatever).
Do you guy(s) agree with me explanation? The behavior I expect, can I count it would be fixed in future versions?
Ah! I don't pretend my patch is the solution for this issue, most likely there will be a better way to achieve the same thing doing it, I am not that familiar with kendo data source, yet.
Cheers,
0
Hi Danny,
Thank you for getting in touch with us.
I am afraid that we will need more time to consider this case. I will forward the question to respective developers for further discussions and will write you back as soon as we have more information (most probably next week).
Kind regards,
Alexander Valchev
the Telerik team
Thank you for getting in touch with us.
I am afraid that we will need more time to consider this case. I will forward the question to respective developers for further discussions and will write you back as soon as we have more information (most probably next week).
Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!