We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Treeview checkbox takes a long time to check/uncheck when large number of children

Hi,
We are using the treeview with checkboxes that may contain thousands of records. If a parent node has a huge number of children (say 2000) when the parent checkbox gets checked / unchecked it takes a while for the check to be shown / hidden. Is there someway to show the loading symbol (ie the same that is used on loadondemand) while all the checkboxes are being checked / unchecked

Cheers ... Rob.

1 Reply

SN Sasikala Nagarajan Syncfusion Team June 5, 2015 12:34 PM UTC


Hi Rob,

Thanks for using Syncfusion products,

We have analyzed your query. There is no inbuild option to achive your requirement.But we can achive this workaround solution.

Please refer the below code snippet:

var element="",obj;

$(function () {

$("#treeView").ejTreeView({showCheckbox:true,nodeClick:"check",create:"create",nodeCheck:"check",nodeUncheck:"check"});

});


function create(args) {

$("#wait").ejWaitingPopup({showOnInit:false,target:"#treeView"});

$(".e-chk-inact").bind("mousedown",clikcer);

obj=$("#wait").ejWaitingPopup('instance');

}

function clikcer(evt) {

obj.show();

}

function check(args) {

if (obj) obj.hide();
}


The waiting popup will show in treeview control, in the mean of while of node checking.

In this, we have created the waiting popup with treeview control element as target. We have used nodeCheck, nodeUncheck client side evets to hide the waiting popup, since this event will be triggered once all nodes are checked. Also to show the waiting popup, we have bounded the “mousedown” event to check box element. The waiting popup will shown when we mouse down on the check box element.


For your conviniace, we have prepared the simple sample based on this. Please get the sample from below location


Sample


Please use given solution in your sample, and let us know if you have further queries,


Regards,


Sasikala Nagarajan


Loader.
Up arrow icon