/// class PD.Web.UI.Controls.GridModule

PD.Web.UI.Controls.GridModule =
Class.extend({

    //===================================
    // FIELDS
    //===================================

    _grid: null,

    //===================================
    // CONSTRUCTOR
    //===================================

    init: function (options) {
    },

    //===================================
    // PROPERTIES
    //===================================

    get_options: function() {
        return this.get_grid().get_options();
    },

    get_grid: function () {
        return this._grid;
    },

    get_dataSource: function () {
        return this.get_grid().get_dataSource();
    },

    get_kendo: function () {
        return this.get_grid().get_kendo();
    },

    get_id: function () {
        return this._id;
    },

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

    getOptionSettings: function () {
        return null;
    },

    activate: function (grid) {
        this._grid = grid;
    },

    start: function () {
        this._registerEventHandlers();
    },

    ready: function () {
        // do nothing on purpose
    },

    stop: function () {
        // do nothing on purpose
    },

    addGridMethod: function (name, fn) {
        this.get_grid()[name] = $.proxy(fn, this);
    },

    meetsLoadConditions: function () {
        return true;
    },

    getOption: function (path, defaultValue) {
        return this.get_grid().getOption(path, defaultValue);
    },

    onError: function () {
        // do nothing on purpose
    },

    unload: function () {
        // do nothing on purpose
    },

    //===================================
    // PRIVATE METHODS
    //===================================

    _registerEventHandlers: function () {
        //do nothing on purpose
    }

});