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

User-initiated dialog error

5 Answers 55 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 25 Feb 2013, 11:40 PM
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?

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 27 Feb 2013, 09:49 AM
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.

0
Josh
Top achievements
Rank 1
answered on 27 Feb 2013, 02:47 PM
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.
0
Accepted
Rosen Vladimirov
Telerik team
answered on 01 Mar 2013, 11:12 AM
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.

0
Josh
Top achievements
Rank 1
answered on 01 Mar 2013, 02:05 PM
Fantastic Rosen, thank you.  I'll keep an eye out for that build.
0
Rosen Vladimirov
Telerik team
answered on 19 Mar 2013, 07:53 AM
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.

Tags
DragAndDrop
Asked by
Josh
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Josh
Top achievements
Rank 1
Rosen Vladimirov
Telerik team
Share this question
or