additional in fo

Thread is closed for posting
5 posts, 0 answers
  1. Sasa
    Sasa avatar
    12 posts
    Member since:
    Aug 2007

    Posted 28 Oct 2008 Link to this post

    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



  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 31 Oct 2008 Link to this post

    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.
  3. Kresimir
    Kresimir avatar
    1 posts
    Member since:
    Oct 2008

    Posted 05 Nov 2008 Link to this post

    working...

    thanks
  4. Creampuff
    Creampuff avatar
    2 posts
    Member since:
    Jun 2007

    Posted 19 Jan 2009 Link to this post

    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
  5. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 20 Jan 2009 Link to this post

    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.
Back to Top