Add text field to each file selected

10 posts, 0 answers
  1. Sean
    Sean avatar
    1 posts
    Member since:
    Jan 2009

    Posted 27 Jan 2009 Link to this post

    We are evaluating your Silverlight upload control and are trying to add a text field to each file selected in order for the user to specify any comments.

    Does this product support such a scenario?

    Regards
  2. Nikolay
    Admin
    Nikolay avatar
    3997 posts

    Posted 29 Jan 2009 Link to this post

    Hi Sean,

    This feature is not available for the time being. We will log it in our To-Do list for further consideration. If the demand for this feature increases we will definitely include it in the control.

    Regards,
    Nick
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft banner
  4. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 13 Feb 2009 Link to this post

    I also have a need for this feature. Even though the upload functionality in itself seems really good, the component is rather limited if we cannot specify metadata for each file. Ideally I would like to be able to specify the DataTemplate for the selected files, so that I can show a dropdown list or some textboxes or whatever for each file.
  5. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 14 Feb 2009 Link to this post

    Hi hwsoderlund,

    Attached you can find an example application where such an modification was implemented.

    Please review following files:
    • MyUploadHandler.ashx.cs - here we extract the custom data sent under a custom upload parameter;
    • Page.xaml - here we initialize the RadUpload's ItemContainerStyle property with a new template for RadUploadItem. Please note the included TextBox with x:Name="CustomTag" - this is the place where you will enter your custom data for each one of uploaded files.
    • Page.xaml.cs - here we actually do some dirty jobs, especially:
      • uploaderTest_UploadStarted() - here we change all TextBoxes to look read-only;
      • uploaderTest_FileUploadStarting() - here we get the custom data under the uploaded file and send it as a custom upload parameter;
      • uploaderTest_FileUploaded() - here we change the foreground color of the TextBox to reflect the upload result - green for success and red if fail;
      • GetCustomTagControl() - very important - here we get access to the TextBox with custom data.
    Please give it a try and let me know if more questions arise.

    Best wishes,
    Ivan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. dan
    dan avatar
    4 posts
    Member since:
    Mar 2009

    Posted 10 Sep 2009 Link to this post

    uploaderTest_FileUploaded() - here we change the foreground color of the TextBox to reflect the upload result - green for success and red if fail;

    Please, notice this does not work with RadUpload latest build....


  7. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 10 Sep 2009 Link to this post

    Hi Daniela,

    Please find attached a renewed version of the example.

    Best wishes,
    Ivan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. dilip nilanka
    dilip nilanka avatar
    5 posts
    Member since:
    Oct 2009

    Posted 19 Oct 2009 Link to this post

    The code sample you have given here is a important. Actually I also needed to add text boxes when the files are selected. This example full fills that requirement. But we need to save the file with the name which will be given within the text box.
    I was able to manage that thing within the "FileUploadStarting" event as below.

    private

     

    void uploaderTest_FileUploadStarting(object sender, Telerik.Windows.Controls.FileUploadStartingEventArgs e)

     

    {

    e.UploadData.FileName = "SampleName.pdf";
    }


    Problem: When a different name is given, the progress bar is not working in that solution. :(. Can you please give a solution for that ASAP. (Did yo notice it?????????????)

     

  9. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 22 Oct 2009 Link to this post

    Hello dilip nilanka,

    Thank you for reporting the issue.

    The bus was fixed. The fix will be released with the upcoming Q3 release.

    Once again than you for reporting the issue.

    Sincerely yours,
    Ivan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  10. Mark
    Mark avatar
    4 posts
    Member since:
    May 2009

    Posted 10 Dec 2010 Link to this post

    I love this, and can definitely use it, but I downloaded it today, and tried to run it.  It works fine for 1 file, but errors in FileUploadStarting if you upload 2 files with a cross-thread error.

    Any chance of getting a new build of this, that works with the latest release and VS2010, and .Net 4 ?

    Thanks,
    Mark
  11. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 15 Dec 2010 Link to this post

    Hi Mark,

    Currently, this is a known issue for us. The RadUpload is handling the uploading of different files async and this event is being raised on different threads. We are still working on resolving this. This is logged in our PITS and you can check its progress from here.

    Greetings,
    Alex Fidanov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top
DevCraft banner