jQWidgets Forums
Forum Replies Created
-
Author
-
March 12, 2016 at 5:39 am in reply to: How to get all the elements of childnode in jqxtree? How to get all the elements of childnode in jqxtree? #82390
Got the solution.
var allItems = $(“#” + dragItem.id).children().length;
for (var x = 0; x < allItems; x++) {
if ($(“#” + dragItem.id).children()[x] == ‘[object HTMLUListElement]’) {
var itemlist = $(“#” + dragItem.id).children()[x].childElementCount;
for (var c = 0; c < itemlist; c++) {
var citems = $(“#” + dragItem.id).children()[x].childNodes[c];if ($(“#” + citems.id).children().length > 1) {
return false;
}}
}needed to loop through all elements(list).
March 11, 2016 at 11:25 am in reply to: How to get all the elements of childnode in jqxtree? How to get all the elements of childnode in jqxtree? #82350$(‘#jqxTree’).jqxTree({ ‘source’: records, height: ‘720px’, width: ‘350px’
, allowDrag: true, allowDrop: true,
dragStart: function (item) {},
dragEnd: function (dragItem, dropItem, args, dropPosition, tree) {
debugger;if (dropItem.level >= 2) {
return false;
}
if (dropItem.level == 1) {
if (dragItem.hasItems == true) {
return false;
}
}if (dropItem.level == 0) {
// If the child of a drop node has a child node then dragging should not happen
}How will I do that?
-
AuthorPosts