Hi there,
I know this question has been asked thousands of time and I search for it in the forum but yet I could find anything to help me out.
As for many people, I'm trying to achieve such feature described here : Demo adding a custom field to an upload process.
Here is my (very simple) code :
This is a usercontrol that I'm dynamically loading into my aspx page via a call to "LoadControl(xxxxx)".
The upload process looks good, everything works properly till it reaches that $(args.get_row()) on line #10.
Anyone has any idea why such "bug" ? Could this be due because I'm loading an external control from the page ?
Thanks,
Chris
I know this question has been asked thousands of time and I search for it in the forum but yet I could find anything to help me out.
As for many people, I'm trying to achieve such feature described here : Demo adding a custom field to an upload process.
Here is my (very simple) code :
01.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="feature-data-upload.ascx.cs"
02.
Inherits="NRP.Study.usercontrols.feature_data_upload" %>
03.
<
telerik:RadScriptBlock
ID
=
"rsbDataUpload"
runat
=
"server"
>
04.
05.
<
script
type
=
"text/javascript"
>
06.
var $ = $telerik.$;
07.
08.
function onClientFileUploaded(radAsyncUpload, args) {
09.
alert(1);
10.
var $row = $(args.get_row());
11.
var inputName = radAsyncUpload.getAdditionalFieldID("TextBox");
12.
var inputType = "text";
13.
var inputID = inputName;
14.
var input = createInput(inputType, inputID, inputName);
15.
var label = createLabel(inputID);
16.
$row.append("<
br
/>");
17.
$row.append(label);
18.
$row.append(input);
19.
}
20.
21.
function createInput(inputType, inputID, inputName) {
22.
var input = '<
input
type
=
"' + inputType + '"
id
=
"' + inputID + '"
name
=
"' + inputName + '"
/>';
23.
return input;
24.
}
25.
26.
function createLabel(forArrt) {
27.
var label = '<
label
for
=
' + forArrt + '
>File info: </
label
>';
28.
return label;
29.
}
30.
function startManualUpload() {
31.
var upload = $find('<%=rauDataUpload.ClientID%>');
32.
upload.startUpload();
33.
}
34.
function pauseManualUpload() {
35.
var upload = $find('<%=rauDataUpload.ClientID%>');
36.
upload.pauseUpload();
37.
}
38.
function resumeManualUpload() {
39.
var upload = $find('<%=rauDataUpload.ClientID%>');
40.
upload.resumeUpload();
41.
}
42.
</
script
>
43.
44.
</
telerik:RadScriptBlock
>
45.
<
telerik:RadProgressManager
ID
=
"rpmDataUpload"
runat
=
"server"
/>
46.
<
ul
>
47.
<
li
>
48.
<
input
type
=
"button"
id
=
"BtnStartUpload"
onclick
=
"startManualUpload()"
49.
value
=
"Start"
/>
50.
</
li
>
51.
<
li
>
52.
<
input
type
=
"button"
id
=
"BtnPauseUpload"
onclick
=
"pauseManualUpload()"
53.
value
=
"Pause"
/>
54.
</
li
>
55.
<
li
>
56.
<
input
type
=
"button"
id
=
"BtnResumeUpload"
onclick
=
"resumeManualUpload()"
57.
value
=
"Resume"
/>
58.
</
li
>
59.
<
li
>
60.
<
asp:Button
ID
=
"BtnSubmitFiles"
runat
=
"server"
OnClick
=
"BtnSubmitFiles_Clicked"
Text
=
"Submit"
/>
61.
</
li
>
62.
</
ul
>
63.
<
telerik:RadAsyncUpload
ID
=
"rauDataUpload"
runat
=
"server"
MultipleFileSelection
=
"Automatic"
64.
ManualUpload
=
"true"
HttpHandlerUrl
=
"~/Study/handlers/DataUploadManager.ashx"
65.
TemporaryFolder
=
"~/App_Data/DataUploads"
OnClientFilesUploaded
=
"onClientFileUploaded"
>
66.
</
telerik:RadAsyncUpload
>
67.
<
telerik:RadProgressArea
ID
=
"rpaDtatUpload"
runat
=
"server"
>
68.
</
telerik:RadProgressArea
>
This is a usercontrol that I'm dynamically loading into my aspx page via a call to "LoadControl(xxxxx)".
The upload process looks good, everything works properly till it reaches that $(args.get_row()) on line #10.
Anyone has any idea why such "bug" ? Could this be due because I'm loading an external control from the page ?
Thanks,
Chris