export_2_cvs programmatically without file save dialog

4 posts, 0 answers
  1. Aaron
    Aaron avatar
    2 posts
    Member since:
    Sep 2016

    Posted 27 Sep Link to this post

    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?
  2. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 30 Sep Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aaron
    Aaron avatar
    2 posts
    Member since:
    Sep 2016

    Posted 01 Oct in reply to Eyup Link to this post

    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.
  5. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 06 Oct Link to this post

    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.
Back to Top