**I have a kendo checkbox treeview with parent and child nodes, in my asp.net mvc web app. The problem is when i uncheck the child node the parent node also unchecks automaticaly. is there any way to avoid this problem thank you in advance.**
Solution: Make the CheckChildren to flase
#{Html.Kendo().TreeView()
.ExpandAll(false)
.Name("PrivelegeTreeView")
.Checkboxes(checkboxes => checkboxes
.Name("checkedFiles")
.CheckChildren(false)
)
Related
I am using vaadin 22 grid with lazy loading. When I click on select all checkbox of grid, no item is selected except select-all checkbox on ui. While debugging the code I obeserved that in grid selection listener, selected item size is equal to the number of items in grid. But on ui the selection for all the item is not reflected.
Thanks in advance.
Thanks You Guys for the inputs,
Resolved the issue after adding equals and hashcode methods in dto object which are used as a data in Grid.
There is a way to display a context menu with right click on a TreeView item node?
Here you can see a how to article about a similar scenario.
Please, let me know in what way we can programmatically know if node in kendo treeview structure has childrens ?
Need to apply corresponding class for nodes which has children...
Thank you !
Look at this demo. They use ngClass in the node template to set the icon displayed on the node.
You can also check if a node has children by using the hasChildren(item) method of the TreeView.
I have two kendo treeview.
When I do a drag and drop an item on an other, I duplicate the item. (no node is removed on drop)
treeright.append(itemSource, itemDestinationKitem);
and it's work fine.
When I click on item (just be drop) the node opens, BUT the itemSource too !
Thx
I found a way around the problem.
By duplicating items kendo ui widget does not regenerate new uid , so to expand a mirror effect occurs.
To solve this problem I SET again the datasource of treeview with call ajax the second treeview and new uid will be affected.
To be in the same state :
I just add persistence on items to keep the state of the nodes 'expand' before loading. This kendo link help me.
I am using Kendo UI tree view with checkboxes. My problem is when i am loading the tree i will be checking some checkboxes using javascript. But this is not selecting parent checkbox automatically. Do i need to do this manually or is there any option in the framework.
Thanks,
Raja
Lets assume that you want to select the node that is selected:
// Get the node that is selected
var selected = treeview.select();
// Find the checkbox associated with this node
var checkbox = $("input[type='checkbox']", selected)[0];
// Click on it for selecting it and its ancestors
checkbox.click();
Being treeview the result of creating kendoTreeView:
var treeview = $("#my_tree").kendoTreeView({...}).data("kendoTreeView");
If you check the nodes by adding the 'checked' attribute with JavaScript
e.g.
$('input').attr('checked','checked')
you will need to handle the parent checking manually. However if you simulate click the TreeView will update its state as it would do if you have used the mouse to click.
e.g.
$('input').click();
Keep in mind you need to call the click on the checkbox input not the span element wrapping it.
Kendo ui (html5) treeview the position is reset to the begining of the tree.
when i bind the many records in the tree . when i select the last node the treeview position is reset to the begining of the tree.
This problem arises only in IE(Internet Explorer 9). in firefox and chrome it is working fine .
The image 1 shows the page that treeview reset to begining of the tree after selecting the tree node at the last record.
the image 2 shows the page that treeview node is selected at the botom