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

additional in fo

4 Answers 76 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Sasa
Top achievements
Rank 1
Sasa asked on 28 Oct 2008, 08:44 AM
hi,

i am using radupload control with some additional info added with javascript.
problem is that i have to add select (combobox) with, if it is possible, options generated from database.

select (combobox) is for me must have, data from database is optional.
is that possible and how?

here i saw examples with adding input or checkbox fields:
http://www.telerik.com/help/aspnet-ajax/upload_raduploadaddinginformation.html

tnx in advance,
kreso



4 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 31 Oct 2008, 01:00 PM
Hi Sasa,

Following the mentioned article you can add the <select> element in this way:

                    //a new row with dropdown list 
                    row = table.insertRow(-1); 
                    cell = row.insertCell(-1); 
                    label = CreateLabel("Select from combo: "); 
                    cell.appendChild(label); 
                    cell = row.insertCell(-1); 
                    input = document.createElement("select"); 
                    input.name = "SelectName"
                    input.options[input.options.length] = new Option('Yes','Yes'); 
                    input.options[input.options.length] = new Option('No','No'); 
                    input.id = input.name = radUpload.getID(input.name); 
                    cell.appendChild(input); 


To access the selected value in the code behind use this code:

foreach (UploadedFile f in RadUpload1.UploadedFiles) 
    string selectedValue = f.GetFieldValue("SelectName"); 

You cannot bind the dropdown to a database in this case.

I hope this helps.

All the best,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kresimir
Top achievements
Rank 1
answered on 05 Nov 2008, 03:01 PM
working...

thanks
0
Creampuff
Top achievements
Rank 1
answered on 19 Jan 2009, 06:24 PM
I am trying to achieve this same result I followed these instructions and I get an error claiming that the dropdown field does not exist so it will not compile
0
Veselin Vasilev
Telerik team
answered on 20 Jan 2009, 08:21 AM
Hello Creampuff,

Can you please paste here some relevant code so we can try to find the problem?


Best wishes,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Upload (Obsolete)
Asked by
Sasa
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Kresimir
Top achievements
Rank 1
Creampuff
Top achievements
Rank 1
Share this question
or