Page 1 of 1

Disable grid using JavaScript

Posted: Sun Feb 17, 2019 3:24 am
by chanatsamon
Hi,

I tried to disable the grid with JavaScript.
Code: Select all
$("#contractorList").find("input,button,textarea,select").attr("disabled", true);
But it doesn't work with multipleFile.
Could you advise me?

Re: Disable grid using JavaScript

Posted: Mon Feb 18, 2019 4:29 am
by ziadeh
Multiple files upload in grid I think its something different while disabling it, you can use this:
Code: Select all
$("#myGrid .pm-multiplefile-grid-icon a").removeClass("pm-multiplefile-upload");
and if you want to enable it
Code: Select all
$("#myGrid .pm-multiplefile-grid-icon a").addClass("pm-multiplefile-upload");

Re: Disable grid using JavaScript

Posted: Sat Jul 20, 2019 11:29 pm
by MayerMonsalve
ziadeh wrote: Mon Feb 18, 2019 4:29 am Multiple files upload in grid I think its something different while disabling it, you can use this:
Code: Select all
$("#myGrid .pm-multiplefile-grid-icon a").removeClass("pm-multiplefile-upload");
and if you want to enable it
Code: Select all
$("#myGrid .pm-multiplefile-grid-icon a").addClass("pm-multiplefile-upload");

I used the sent JS, but it completely disables the multiplefile and it does not let me see the loaded document. I need you to let me download the loaded document

Re: Disable grid using JavaScript

Posted: Sun Jul 21, 2019 1:46 am
by ziadeh
You need to disable the upload button in a Modal window, try to use this code:
Code: Select all
$("#myGrid .pm-multiplefile-grid-icon a").click(function() {
setTimeout(function() {
	$("#modalUpload .btn-uploadfile").attr('disabled', 'disabled');
},0);
});

Re: Disable grid using JavaScript

Posted: Sun Jul 21, 2019 11:38 am
by MayerMonsalve
ziadeh wrote: Sun Jul 21, 2019 1:46 am You need to disable the upload button in a Modal window, try to use this code:
Code: Select all
$("#myGrid .pm-multiplefile-grid-icon a").click(function() {
setTimeout(function() {
	$("#modalUpload .btn-uploadfile").attr('disabled', 'disabled');
},0);
});

thank you! I tried it and it worked perfectly.for to disable the delete button, i use
$("div.multiplefile-button-delete").remove();
and this worked perfectly! Thank you very much!!!