RadUpload showfiledialog error

4 posts, 0 answers
  1. ere gon
    ere gon avatar
    7 posts
    Member since:
    Nov 2009

    Posted 01 Nov 2010 Link to this post

    Hi
    I am upgrading latest telerik binaries and in upgradation, I have one issue in RadUpload.

    When RadUpload.ShowFileDialog(); method called it will through the error as follows

    System.Security.SecurityException: Dialogs must be user-initiated.


    i saw your answer to this question: "Yes, indeed this is a restriction of Silverlight. The file dialogs can only be shown in a callstack (handler) of a user's MouseButton event. We cannot work around this limitation and hence the method should only be called in a handler of a user action".

    i cant understand the answer, can you please send me a sample, on how i can upload files using the radupload.

    Thanks

  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 03 Nov 2010 Link to this post

    Hello ere gon,

    An OpenFileDialog can be opened only through a user's action. It cannot be opened from procedural code, which is what happens when you execute the ShowFileDialog method. This method will have to be called for example from inside a button's click event, which is what happens when you click on the "Browse" button of the RadUpload. Examples of how you can upload files with the RadUpload you may find in the QSF sample as well as walkthrough articles in our help here.

    Regards,
    Alex Fidanov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. ere gon
    ere gon avatar
    7 posts
    Member since:
    Nov 2009

    Posted 03 Nov 2010 Link to this post

    Hi

    This is exactly what i do :

    private

     

     

    void btnBrowse_Click(object sender, System.Windows.RoutedEventArgs e)

     

    {

     

     

    this.radUpload.ShowFileDialog();

     

    }

     

     

    still i get the error,

    can you please write to me, what i should write in the buttonclick event.

     

     

  5. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 05 Nov 2010 Link to this post

    Hello ere gon,

    I have the very same code working correctly with me. Is it possible to provide us with the application that you are testing this on (together with the assemblies) so that we can look into this? If so, you can open a support ticket and attach the project there or use some temporary online file storage.

    Thank you.

    All the best,
    Alex Fidanov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top