X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=Roo%2Fgrid%2FGrid.js;h=14d4a7a11120f9105d7a7e31380e9e72d9ef6afa;hp=aeef9e61858bf895bfeef13cc9900815b035dad5;hb=6769ede9cd70d738a188f2d4314738d171b50deb;hpb=54fe6a2dc6d24d86a8b3ccf760e1693bcdb7423e diff --git a/Roo/grid/Grid.js b/Roo/grid/Grid.js index aeef9e6185..14d4a7a111 100644 --- a/Roo/grid/Grid.js +++ b/Roo/grid/Grid.js @@ -484,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(); @@ -501,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);