/// class PD.Web.UI.Controls.ViewGridExportFormattedCommand

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

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

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

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

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

    }

});