Hi,
I m using export to excel. Its working fine if records in datagrid are less. But if records are large e.g above 2000 rows its not working.Giving messaga Dialogs must be user-initiated Export to excel.
My code is as below
SaveFileDialog dialog = new SaveFileDialog { Filter = "Excel files|*.xls", DefaultExt = "xls" };
bool? showDialog = dialog.ShowDialog();
if (showDialog == true)
{
using (Stream exportStream = dialog.OpenFile())
dataWorkbook.Save(exportStream);
exportStream.Close();
}
So please give solution for large data
Thanks,
Nandu
Hi Nandu,
Go through the attched sample and see if it will solve the problem.
Enter the items number in the TextBox next to the "Bind" button and press this button to populate the grid. Then export.
Regards,
Stefana
Can u give solution for that?
As I understand it, in Silverlight the user initiated dialogs like SaveFileDialog are timer-based (I've read approx 1 second). So that means if you have a long running task happen in the button click prior to opening the dialog this may cause the dialogs "user-initiated" test to fail.
Devin
Hi, I tried 1346.excexp.zip example and change line
for
(int i = 0; i < 9; i++) to
for(int i=0;i<4000;i++)
testing for large data. But it gives errorDialogs must be user-initiated.
at line
bool
? showDialog = dialog.ShowDialog();
Same isssue gets in my application
So please anybody give solution for that.
See if this solution will help: http://community.infragistics.com/forums/t/34069.aspx
Thanks,George