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

Excel export problem

3 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
George Gilman
Top achievements
Rank 1
George Gilman asked on 12 Mar 2010, 06:25 AM
I am trying to export data from a GridView control following the sample code at http://demos.telerik.com/silverlight/#GridView/Exporting.

When I try to execute the following line, I get a SecurityException with the description "Dialogs must be user-initiated." Any hints about how to fix this?

Thanks in advance,

g2

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 12 Mar 2010, 08:21 AM
Hi,

You can check this thread for more info.

Kind regards,
Vlad
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.
0
Terry
Top achievements
Rank 1
answered on 07 Apr 2010, 02:11 AM
I had the same issue, but my code IS in a button click event.  I found the problem for me (with SL4 04/02 RC running on VS2010 RC) was that I had a breakpoint.  It appears that as soon as you hit a breakpoint, the event is no longer considered user-initiated.

Once I got by that, I was able to create the xls anywhere on my local hard drive.  But now the problem is how to display the xls in the same click event.  The following code gets "access is denied".  Any suggestions?  Single forward slashes or double back-slashes get the same results.

System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("file:///c:\\Temp\\Test2.xls", UriKind.Absolute), "_blank"); 

A second issue is I can't figure out how to get the file path from the dialog object, hence the hard-coded file path above.

Any help would be appreciated.

Thanks,

Terry
0
Vlad
Telerik team
answered on 08 Apr 2010, 01:32 PM
Hello Terry,

Maybe you can use COM to do this - please check this post for more info.

Kind regards,
Vlad
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.
Tags
GridView
Asked by
George Gilman
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Terry
Top achievements
Rank 1
Share this question
or