User-initiated dialog error

6 posts, 1 answers
  1. Josh
    Josh avatar
    27 posts
    Member since:
    Feb 2012

    Posted 25 Feb 2013 Link to this post

    We're in the process of updating our telerik controls to the new 2013 Q1 binaries.  Since RadDragAndDropManager is deprecated, we're converting our code to use the DragDropManger.

    One of the ways we use drag-n-drop is to allow the user to drag an excel icon on the screen to a control, such as a RadGridView or Listbox, and export the data from that control to an Excel or CSV file.  All we do is display a SaveFileDialog after the user drops the icon on the control.  After replacing RadDropAndDropManager with DragDropManager, we now get the security exception that says "Dialogs must be user-initiated."  The only additional code we added between the user releasing the mouse and displaying the dialog is a single line to retrieve what control is the target of the drop from the DragDropPayloadManager.  Is there something fundamentally different with the DragDropManager that makes Silverlight treat its events as not user-initiated?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 27 Feb 2013 Link to this post

    Hello,

    What this error message means is that you can only show a SaveFileDialog in response to a user initiated event, such as a button click. This is a limitation of the Silverlight. You can check this forum thread for a suggestion in such situation.

    All the best,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Josh
    Josh avatar
    27 posts
    Member since:
    Feb 2012

    Posted 27 Feb 2013 Link to this post

    Thanks for the reply Didie.

    I'm aware of this limitation and we do exactly what is in that post.  As soon as the drop event gets fired, the first thing that happens is we show the dialog.  This worked 100% correctly with RadDragAndDropManager.  But when we switched to DragDropManager, this same code stopped working.  Which leads me to believe that DragDropManager is handling the MouseButtonUp event from the user differently and is preventing the fact that the event is user-initiated from being bubbled up.  This is a pretty extreme loss of functionality that will likely prevent us from upgrading to the newest controls.
  5. Answer
    Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 01 Mar 2013 Link to this post

    Hello Josh,

    Thank you for pointing this problem. We have successfully reproduced it and our developers are working on the fix. We will include it in one of our next internal builds.

    We are sorry for the caused inconvenience. I've updated your Telerik Points as a small sign of our appreciation for your efforts.

    Regards,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Josh
    Josh avatar
    27 posts
    Member since:
    Feb 2012

    Posted 01 Mar 2013 Link to this post

    Fantastic Rosen, thank you.  I'll keep an eye out for that build.
  7. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 19 Mar 2013 Link to this post

    Hi Josh,

    We have fixed this problem and the fix is available in our latest internal build (2013.1.0318). You can download it under your account. Please give it a try and inform us if you still have any problems or concerns.

    All the best,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner