/// class PD.Web.UI.Controls.ViewGridColumnRemoveCommand
/// using PD.Web.UI.Controls.ViewGridColumnCommand

PD.Web.UI.Controls.ViewGridColumnRemoveCommand =
PD.Web.UI.Controls.ViewGridColumnCommand.extend({

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

    setDefaults: function () {
        this._super();
        this.props("id", "column/remove");
        this.props("enabled", true);
        this.props("label", "Remove Column");
        this.props("tooltip", "Remove Column");
    },

    execute: function (e) {
        this._super(e);
        
        var that = this,
            service = new PD.Web.UI.Controls.ViewGridService();

        service.removeColumn(that.get_viewStateId(), that.get_columnId(), function () {
            that.get_viewGrid().build();
        });

    }

});