/// class PD.Web.UI.Controls.ViewGridExportUnformattedCommand

PD.Web.UI.Controls.ViewGridExportUnformattedCommand =
PD.Web.UI.Controls.ViewGridCommand.extend({

    //===================================
    // PUBLIC METHODS
    //===================================

    setDefaults: function () {
        this._super();
        this.props("id", "view-grid/export-unformatted");
        this.props("enabled", true);
        //this.props("icon", PD.Path.to16x16("columns.png"));
        this.props("label", "Export");
        this.props("tooltip", "Export");
    },

    execute: function (e) {
        this._super(e);

        PD.Web.Utilities.DownloadManager.download("~/view/export", {
            viewStateId: this.get_viewStateId(),
            format: false,
            contextualFilters: JSON.stringify(this.get_viewGrid().getContextualFilters())
        });

    }

});