hello I can’t open a topic, it’s being deleted
I’ve created this thread many times but I can’t see it.
hello I have 27 columns, when I hide or show ,the loop is very slow run(show/hide average of 5 seconds)
but when i remove this the loop runs fast
$("#" + $grid).jqxGrid('showcolumn', column);
$("#" + $grid).jqxGrid('hidecolumn', column);
What is the reason?
How can I hide and show all columns without looping?
thank you
example image
https://ibb.co/RQJ8SVs
$('#GridColumnCheck').off('change');
$(document).on("change", "#GridColumnCheck", function (event) {
event.stopPropagation();
var chk = $(this).nextAll(".chk");
var $grid = $(this).attr("data-grid");
var checked = this.checked;
debugger
$.each(chk, function (index, value) {
var column = $(this).attr("data-column");
if (checked) {
$(this).jqxCheckBox({ checked: true });
$("#" + $grid).jqxGrid('showcolumn', column);
}
else {
$(this).jqxCheckBox({ checked: false });
$("#" + $grid).jqxGrid('hidecolumn', column);
}
})
});