Hi all...
How do we export the data from datagrid to excel and pdf files in Silverlight??
I have been trying this since long, but failed.
Please help.
This is urgently required...
Thanks all in advance..
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sean StewartRank #5,857 · 284 reputationPosted Mar 7, 2013, 5:48 PM EST
http://www.codeproject.com/Articles/45731/Export-Silverlight-DataGrid-to-Excel-XML-CSV
Riddhi ValechaRank #794 · 2.9K reputationPosted Mar 7, 2013, 8:15 PM EST
i tried this code..
SaveFileDialog objSFD = new SaveFileDialog() { DefaultExt = "csv", Filter = "CSV Files (*.csv)|*.csv|Excel XML (*.xml)|*.xml|All files (*.*)|*.*", FilterIndex = 1 }; if (objSFD.ShowDialog() == true) {} There is an error in the IF-Condition - System.SecuritySettings - dialogs must be user intiated.. ---------------- My Requirement - I have an IList MEthod() in Silverlight.svc.cs file. I have 1linq query in it. I have loaded that in the gridview. Now, I want to export it. ---Riddhi ValechaRank #794 · 2.9K reputationPosted Mar 7, 2013, 10:42 PM EST
--------------
System.Security.SecurityException:Dialogs must be user-initiated. at System.windows.controls.SaveFileDialog.ShowDialogInternal(Window owner)
----------------
I am unable to solve this issue.
This is is SaveFileDialog() method(boolean method).
Datagrid Data looks like -
Please help.... this is urgently required...
Please help..
Thanks all in advance..