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

export_2_cvs programmatically without file save dialog

3 Answers 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 28 Sep 2016, 04:36 AM
When executing the grid-command grid.MasterTableView.ExportToCsv() a File Save Dialog pops up. I have a function created that when the event grid_exporting() is generated I save the file and don't won't the user to have the option to save, save as or cancel. How do I disable the feature?

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 30 Sep 2016, 08:46 AM
Hello Aaron,

Generally, you can control this behavior using the following property:
<ExportSettings OpenInNewWindow="false">

However, each browser has its specific handling of downloading files, therefore, you cannot download it directly on every browser.

Regards,
Eyup
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Aaron
Top achievements
Rank 1
answered on 01 Oct 2016, 09:42 PM
Thank you, I did have that setting set to false but still do get a popup save file dialog.  I'm going to try saving the grid data without using the ExportToCsv() function.
0
Eyup
Telerik team
answered on 06 Oct 2016, 05:38 AM
Hello Aaron,

Yes, as I stated in my previous post, this behavior depends on the specific browser.
You can use the built-in Export to CSV button:
<MasterTableView ... CommandItemDisplay="Top">
    <CommandItemSettings ShowExportToCsvButton="true" />

Regards,
Eyup
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Aaron
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Aaron
Top achievements
Rank 1
Share this question
or