Hi,
I am trying to implement a context menu for the GridView, in order for a user to export the grid contents to an excel file.
The context menu works and I get the ItemClick event. However when I call the SaveFileDialog's ShowDialog method, I get a SecurityException stating:
System.Security.SecurityException: Dialogs must be user-initiated.
at System.Windows.Controls.SaveFileDialog.ShowDialog()
The Context menu click is a user initiated action. Is there some way to get the system to recognize this from the context menu click is user initiated?
Regards,
Ivan.
I am trying to implement a context menu for the GridView, in order for a user to export the grid contents to an excel file.
The context menu works and I get the ItemClick event. However when I call the SaveFileDialog's ShowDialog method, I get a SecurityException stating:
System.Security.SecurityException: Dialogs must be user-initiated.
at System.Windows.Controls.SaveFileDialog.ShowDialog()
The Context menu click is a user initiated action. Is there some way to get the system to recognize this from the context menu click is user initiated?
Regards,
Ivan.