Hi Telerik Team,
I am trying to clear all the file inputs(all files that are uploaded) that are uploaded for RadAsync Upload control on Button click event,
My button click code is as follows:
<asp:Button ID="btnTest" runat="server" OnClientClick="return resetBatch();" Text="Reset Batch"/>
my javascript code is as follows:
function resetBatch() {
var upload = $find("<%= radBatchAttachment.ClientID %>");
var inputs = upload.getUploadedFiles();
for (i = inputs.length - 1; i >= 0; i--) {
upload.deleteFileInputAt(i);
}
return false;
}
But I am getting a error at line "var inputs = upload.getUploadedFiles();", Please find the error image in attachment "Error.png",
and RadAsyncUpload control is not clearing the files uploaded.
when I use the following approach using the function as follows:
function resetBatch() {
debugger;
var upload = $find("<%= radBatchAttachment.ClientID %>");
var count = upload._uploadedFiles.length;
for (var i = 0; i <= (count - 1); i++) {
upload.deleteFileInputAt(i);
}
return false;
}
I am getting the following error:
that is present in attachment "ResetRadAsyncUpload.png"
Please help me in doing this. I am in big need of this.
I am trying to clear all the file inputs(all files that are uploaded) that are uploaded for RadAsync Upload control on Button click event,
My button click code is as follows:
<asp:Button ID="btnTest" runat="server" OnClientClick="return resetBatch();" Text="Reset Batch"/>
my javascript code is as follows:
function resetBatch() {
var upload = $find("<%= radBatchAttachment.ClientID %>");
var inputs = upload.getUploadedFiles();
for (i = inputs.length - 1; i >= 0; i--) {
upload.deleteFileInputAt(i);
}
return false;
}
But I am getting a error at line "var inputs = upload.getUploadedFiles();", Please find the error image in attachment "Error.png",
and RadAsyncUpload control is not clearing the files uploaded.
when I use the following approach using the function as follows:
function resetBatch() {
debugger;
var upload = $find("<%= radBatchAttachment.ClientID %>");
var count = upload._uploadedFiles.length;
for (var i = 0; i <= (count - 1); i++) {
upload.deleteFileInputAt(i);
}
return false;
}
I am getting the following error:
that is present in attachment "ResetRadAsyncUpload.png"
Please help me in doing this. I am in big need of this.
--------------------------------------------------------
Aravinda Chary N
Ph: 9700308156
www.manamai.com