X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fgrid%2FGrid.js;h=14d4a7a11120f9105d7a7e31380e9e72d9ef6afa;hb=6769ede9cd70d738a188f2d4314738d171b50deb;hp=076e3941cfaa25201288a1b7fddb0086a272bc01;hpb=52a05905feb89a6a11f44871702151fe8a60f232;p=roojs1 diff --git a/Roo/grid/Grid.js b/Roo/grid/Grid.js index 076e3941cf..14d4a7a111 100644 --- a/Roo/grid/Grid.js +++ b/Roo/grid/Grid.js @@ -442,8 +442,6 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, { this.autoHeight = true; } var view = this.getView(); - Roo.log('view???'); - Roo.log(view); view.init(this); c.on("click", this.onClick, this); @@ -486,12 +484,12 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, { return this; }, - /** - * Reconfigures the grid to use a different Store and Column Model. - * The View will be bound to the new objects and refreshed. - * @param {Roo.data.Store} dataSource The new {@link Roo.data.Store} object - * @param {Roo.grid.ColumnModel} The new {@link Roo.grid.ColumnModel} object - */ + /** + * Reconfigures the grid to use a different Store and Column Model. + * The View will be bound to the new objects and refreshed. + * @param {Roo.data.Store} dataSource The new {@link Roo.data.Store} object + * @param {Roo.grid.ColumnModel} The new {@link Roo.grid.ColumnModel} object + */ reconfigure : function(dataSource, colModel){ if(this.loadMask){ this.loadMask.destroy(); @@ -503,7 +501,22 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, { this.colModel = colModel; this.view.refresh(true); }, - + /** + * addColumn + * Add's a column, default at the end.. + * @param {Object} column configuration see {@link Roo.grid.ColumnModel} + * @param {int} position to add (default end) + */ + addColumn : function(cfg, pos) + { + cfg.id = typeof(cfg.id) == 'undefined' : Roo.id() : cfg.id; // don't normally use this.. + + + } + + + + // private onKeyDown : function(e){ this.fireEvent("keydown", e);