Hello Telerik Team,
I used RadUpload to upload 5 documents , also added a custom "textbox" called "Title" to each file.
Now, before hitting "Upload" button, I want to make sure that "Tilte" has been entered for each file.
So, I wrote a script function for "OnClientFileselected" , and trying to clear the input when a file is selected
without entering "Title".
Now, I used the upload.clearFileInputAt method. However, its not working if I give any conditions to clear
files at specified index like in the below code.
function clear_file(index) {
var upload = $find("<%= RadUpload1.ClientID %>");
var fileInputs = upload.getFileInputs();
for (var i = 1; i < fileInputs.length; i++) {
if (i != index) {
}
else {
upload.clearFileInputAt(i);
}
}
}
I got completely lost, why the condition is not working. If i remove the "if- else" then its working and clearing up all inputs.
Please help me at your earliest convenience.
Thank you,
Bharathi