This is a migrated thread and some comments may be shown as answers.

textbox for uploaded files

1 Answer 51 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
beeta one
Top achievements
Rank 1
beeta one asked on 28 Sep 2012, 03:27 AM
hii,
want to adda textbox to every uploaded files in a RadAsyncUpload to enter some additional info. Can anybody please help me to achieve this scenario.


thanks.....

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 Sep 2012, 03:40 AM
Hi Hash,

Try the following code snippet to achieve your scenario.

ASPX:
<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" OnClientFileUploaded="onClientFileUploaded" MultipleFileSelection="Automatic">
</telerik:RadAsyncUpload>

JS:
<script type="text/javascript">
     var $ = $telerik.$;
 
     function onClientFileUploaded(radAsyncUpload, args) {
         var $row = $(args.get_row());
         var inputName = radAsyncUpload.getAdditionalFieldID("TextBox");
         var inputType = "text";
         var inputID = inputName;
         var input = createInput(inputType, inputID, inputName);
         var label = createLabel(inputID);
         $row.append("<br/>");
         $row.append(label);
         $row.append(input);
     }
 
     function createInput(inputType, inputID, inputName) {
         var input = '<input type="' + inputType + '" id="' + inputID + '" name="' + inputName + '" />';
         return input;
     }
 
     function createLabel(forArrt) {
         var label = '<label for=' + forArrt + '>File info: </label>';
         return label;
     }
</script>

Please take a look into this for more information.
Hope this helps.

Regards,
Princy.
Tags
AsyncUpload
Asked by
beeta one
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or