X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..e9397f91ede62d446aed37d23256e8938fc4c335:/docs/source/GridPanel.html?ds=inline diff --git a/docs/source/GridPanel.html b/docs/source/GridPanel.html index 1b9afabd..27d88729 100644 --- a/docs/source/GridPanel.html +++ b/docs/source/GridPanel.html @@ -7,10 +7,10 @@
/*!
- * Ext JS Library 3.2.0
- * Copyright(c) 2006-2010 Ext JS, Inc.
- * licensing@extjs.com
- * http://www.extjs.com/license
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
  */
 
/** * @class Ext.grid.GridPanel @@ -105,21 +105,25 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { *

See {@link #autoExpandMax} and {@link #autoExpandMin} also.

*/ autoExpandColumn : false, +
/** * @cfg {Number} autoExpandMax The maximum width the {@link #autoExpandColumn} * can have (if enabled). Defaults to 1000. */ autoExpandMax : 1000, +
/** * @cfg {Number} autoExpandMin The minimum width the {@link #autoExpandColumn} * can have (if enabled). Defaults to 50. */ autoExpandMin : 50, +
/** * @cfg {Boolean} columnLines true to add css for column separation lines. * Default is false. */ columnLines : false, +
/** * @cfg {Object} cm Shorthand for {@link #colModel}. */ @@ -143,12 +147,14 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * {0} is replaced with the number of selected rows. */ ddText : '{0} selected row{1}', +
/** * @cfg {Boolean} deferRowRender

Defaults to true to enable deferred row rendering.

*

This allows the GridPanel to be initially rendered empty, with the expensive update of the row * structure deferred so that layouts with GridPanels appear more quickly.

*/ deferRowRender : true, +
/** * @cfg {Boolean} disableSelection

true to disable selections in the grid. Defaults to false.

*

Ignored if a {@link #selModel SelectionModel} is specified.

@@ -162,11 +168,13 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * with the {@link #enableHdMenu header menu}. */ enableColumnHide : true, +
/** * @cfg {Boolean} enableColumnMove Defaults to true to enable drag and drop reorder of columns. false * to turn off column reordering via drag drop. */ enableColumnMove : true, +
/** * @cfg {Boolean} enableDragDrop

Enables dragging of the selected rows of the GridPanel. Defaults to false.

*

Setting this to true causes this GridPanel's {@link #getView GridView} to @@ -179,10 +187,12 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * to process the {@link Ext.grid.GridDragZone#getDragData data} which is provided.

*/ enableDragDrop : false, +
/** * @cfg {Boolean} enableHdMenu Defaults to true to enable the drop down button for menu in the headers. */ enableHdMenu : true, +
/** * @cfg {Boolean} hideHeaders True to hide the grid's header. Defaults to false. */ @@ -191,6 +201,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * loading. Defaults to false. */ loadMask : false, +
/** * @cfg {Number} maxHeight Sets the maximum height of the grid - ignored if autoHeight is not on. */ @@ -198,6 +209,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * @cfg {Number} minColumnWidth The minimum width a column can be resized to. Defaults to 25. */ minColumnWidth : 25, +
/** * @cfg {Object} sm Shorthand for {@link #selModel}. */ @@ -216,11 +228,13 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * modifier, or which uses a CSS selector of higher specificity.

*/ stripeRows : false, +
/** * @cfg {Boolean} trackMouseOver True to highlight rows when the mouse is over. Default is true * for GridPanel, but false for EditorGridPanel. */ trackMouseOver : true, +
/** * @cfg {Array} stateEvents * An array of events that, when fired, should trigger this component to save its state. @@ -233,6 +247,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * Component state.

*/ stateEvents : ['columnmove', 'columnresize', 'sortchange', 'groupchange'], +
/** * @cfg {Object} view The {@link Ext.grid.GridView} used by the grid. This can be set * before a call to {@link Ext.Component#render render()}. @@ -255,14 +270,15 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { // private rendered : false, + // private viewReady : false, // private - initComponent : function(){ + initComponent : function() { Ext.grid.GridPanel.superclass.initComponent.call(this); - if(this.columnLines){ + if (this.columnLines) { this.cls = (this.cls || '') + ' x-grid-with-col-lines'; } // override any provided value since it isn't valid @@ -657,18 +673,21 @@ function(grid, rowIndex, columnIndex, e) { store = this.store, s, c, - oldIndex; + colIndex; if(cs){ for(var i = 0, len = cs.length; i < len; i++){ s = cs[i]; c = cm.getColumnById(s.id); if(c){ - c.hidden = s.hidden; - c.width = s.width; - oldIndex = cm.getIndexById(s.id); - if(oldIndex != i){ - cm.moveColumn(oldIndex, i); + colIndex = cm.getIndexById(s.id); + cm.setState(colIndex, { + hidden: s.hidden, + width: s.width, + sortable: s.sortable + }); + if(colIndex != i){ + cm.moveColumn(colIndex, i); } } } @@ -708,6 +727,9 @@ function(grid, rowIndex, columnIndex, e) { if(c.hidden){ o.columns[i].hidden = true; } + if(c.sortable){ + o.columns[i].sortable = true; + } } if(store){ ss = store.getSortState(); @@ -729,7 +751,7 @@ function(grid, rowIndex, columnIndex, e) { Ext.grid.GridPanel.superclass.afterRender.call(this); var v = this.view; this.on('bodyresize', v.layout, v); - v.layout(); + v.layout(true); if(this.deferRowRender){ if (!this.deferRowRenderTask){ this.deferRowRenderTask = new Ext.util.DelayedTask(v.afterRender, this.view); @@ -906,10 +928,11 @@ function(grid, rowIndex, columnIndex, e) { * Returns the grid's GridView object. * @return {Ext.grid.GridView} The grid view */ - getView : function(){ - if(!this.view){ + getView : function() { + if (!this.view) { this.view = new Ext.grid.GridView(this.viewConfig); } + return this.view; },
/**