hi this seems to be an error on my part. i managed to solve it. but i would like to check if for the additonal field i am able to add a "select" element. as when i did this during post back i got a null pointer exception
protected
void
btn_Submit_Click(
object
sender, EventArgs e)
{
result.Text =
""
;
foreach
(UploadedFile file
in
RadAsyncUpload1.UploadedFiles)
{
result.Text +=
"File: "
+ file.FileName +
"doc type is "
+ file.GetFieldValue(
"documentType"
).ToString() +
"<br />"
;
}
}
updated markup:
01.
<
telerik:RadAsyncUpload
ID
=
"RadAsyncUpload1"
runat
=
"server"
OnClientFileUploaded
=
"onClientFileUploaded"
MultipleFileSelection
=
"Automatic"
></
telerik:RadAsyncUpload
>
02.
<
asp:Label
ID
=
"result"
runat
=
"server"
></
asp:Label
>
03.
<
asp:Button
ID
=
"btn_Submit"
runat
=
"server"
Text
=
"Submit"
OnClick
=
"btn_Submit_Click"
/>
04.
05.
<
script
>
06.
(function () {
07.
08.
window.onClientFileUploaded = function (radAsyncUpload, args) {
09.
var row = args.get_row(),
10.
inputName = radAsyncUpload.getAdditionalFieldID("documentType"),
11.
inputType = "text",
12.
inputID = inputName,
13.
input = createInput(),
14.
label = createLabel(inputID);
15.
16.
row.appendChild(label);
17.
row.appendChild(input);
18.
}
19.
20.
function createInput() {
21.
var input = document.createElement("select");
22.
23.
var option = new Option();
24.
option.value = "HR";
25.
option.text = "HR";
26.
input.options.add(option);
27.
28.
var option1 = new Option();
29.
option1.value = "Finance";
30.
option1.text = "Finance";
31.
input.options.add(option1);
32.
33.
var option2 = new Option();
34.
option2.value = "IT";
35.
option2.text = "IT";
36.
input.options.add(option2);
37.
return input;
38.
}
39.
40.
function createLabel(forArrt) {
41.
var label = document.createElement("label");
42.
43.
label.setAttribute("for", forArrt);
44.
label.innerHTML = "Document Type: ";
45.
46.
return label;
47.
}
48.
})();
49.
</
script
>