3 * Copyright(c) 2006-2010 Sencha Inc.
5 * http://www.sencha.com/license
8 * @class Ext.grid.GridPanel
10 * <p>This class represents the primary interface of a component based grid control to represent data
11 * in a tabular format of rows and columns. The GridPanel is composed of the following:</p>
12 * <div class="mdetail-params"><ul>
13 * <li><b>{@link Ext.data.Store Store}</b> : The Model holding the data records (rows)
14 * <div class="sub-desc"></div></li>
15 * <li><b>{@link Ext.grid.ColumnModel Column model}</b> : Column makeup
16 * <div class="sub-desc"></div></li>
17 * <li><b>{@link Ext.grid.GridView View}</b> : Encapsulates the user interface
18 * <div class="sub-desc"></div></li>
19 * <li><b>{@link Ext.grid.AbstractSelectionModel selection model}</b> : Selection behavior
20 * <div class="sub-desc"></div></li>
22 * <p>Example usage:</p>
24 var grid = new Ext.grid.GridPanel({
25 {@link #store}: new {@link Ext.data.Store}({
26 {@link Ext.data.Store#autoDestroy autoDestroy}: true,
27 {@link Ext.data.Store#reader reader}: reader,
28 {@link Ext.data.Store#data data}: xg.dummyData
30 {@link #colModel}: new {@link Ext.grid.ColumnModel}({
31 {@link Ext.grid.ColumnModel#defaults defaults}: {
35 {@link Ext.grid.ColumnModel#columns columns}: [
36 {id: 'company', header: 'Company', width: 200, sortable: true, dataIndex: 'company'},
37 {header: 'Price', renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
38 {header: 'Change', dataIndex: 'change'},
39 {header: '% Change', dataIndex: 'pctChange'},
40 // instead of specifying renderer: Ext.util.Format.dateRenderer('m/d/Y') use xtype
42 header: 'Last Updated', width: 135, dataIndex: 'lastChange',
43 xtype: 'datecolumn', format: 'M d, Y'
47 {@link #viewConfig}: {
48 {@link Ext.grid.GridView#forceFit forceFit}: true,
50 // Return CSS class to apply to rows depending upon data values
51 {@link Ext.grid.GridView#getRowClass getRowClass}: function(record, index) {
52 var c = record.{@link Ext.data.Record#get get}('change');
60 {@link #sm}: new Ext.grid.RowSelectionModel({singleSelect:true}),
64 title: 'Framed with Row Selection and Horizontal Scrolling',
68 * <p><b><u>Notes:</u></b></p>
69 * <div class="mdetail-params"><ul>
70 * <li>Although this class inherits many configuration options from base classes, some of them
71 * (such as autoScroll, autoWidth, layout, items, etc) are not used by this class, and will
72 * have no effect.</li>
73 * <li>A grid <b>requires</b> a width in which to scroll its columns, and a height in which to
74 * scroll its rows. These dimensions can either be set explicitly through the
75 * <tt>{@link Ext.BoxComponent#height height}</tt> and <tt>{@link Ext.BoxComponent#width width}</tt>
76 * configuration options or implicitly set by using the grid as a child item of a
77 * {@link Ext.Container Container} which will have a {@link Ext.Container#layout layout manager}
78 * provide the sizing of its child items (for example the Container of the Grid may specify
79 * <tt>{@link Ext.Container#layout layout}:'fit'</tt>).</li>
80 * <li>To access the data in a Grid, it is necessary to use the data model encapsulated
81 * by the {@link #store Store}. See the {@link #cellclick} event for more details.</li>
84 * @param {Object} config The config object
87 Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
89 * @cfg {String} autoExpandColumn
90 * <p>The <tt>{@link Ext.grid.Column#id id}</tt> of a {@link Ext.grid.Column column} in
91 * this grid that should expand to fill unused space. This value specified here can not
93 * <br><p><b>Note</b>: If the Grid's {@link Ext.grid.GridView view} is configured with
94 * <tt>{@link Ext.grid.GridView#forceFit forceFit}=true</tt> the <tt>autoExpandColumn</tt>
95 * is ignored. See {@link Ext.grid.Column}.<tt>{@link Ext.grid.Column#width width}</tt>
96 * for additional details.</p>
97 * <p>See <tt>{@link #autoExpandMax}</tt> and <tt>{@link #autoExpandMin}</tt> also.</p>
99 autoExpandColumn : false,
102 * @cfg {Number} autoExpandMax The maximum width the <tt>{@link #autoExpandColumn}</tt>
103 * can have (if enabled). Defaults to <tt>1000</tt>.
105 autoExpandMax : 1000,
108 * @cfg {Number} autoExpandMin The minimum width the <tt>{@link #autoExpandColumn}</tt>
109 * can have (if enabled). Defaults to <tt>50</tt>.
114 * @cfg {Boolean} columnLines <tt>true</tt> to add css for column separation lines.
115 * Default is <tt>false</tt>.
120 * @cfg {Object} cm Shorthand for <tt>{@link #colModel}</tt>.
123 * @cfg {Object} colModel The {@link Ext.grid.ColumnModel} to use when rendering the grid (required).
126 * @cfg {Array} columns An array of {@link Ext.grid.Column columns} to auto create a
127 * {@link Ext.grid.ColumnModel}. The ColumnModel may be explicitly created via the
128 * <tt>{@link #colModel}</tt> configuration property.
131 * @cfg {String} ddGroup The DD group this GridPanel belongs to. Defaults to <tt>'GridDD'</tt> if not specified.
134 * @cfg {String} ddText
135 * Configures the text in the drag proxy. Defaults to:
137 * ddText : '{0} selected row{1}'
139 * <tt>{0}</tt> is replaced with the number of selected rows.
141 ddText : '{0} selected row{1}',
144 * @cfg {Boolean} deferRowRender <P>Defaults to <tt>true</tt> to enable deferred row rendering.</p>
145 * <p>This allows the GridPanel to be initially rendered empty, with the expensive update of the row
146 * structure deferred so that layouts with GridPanels appear more quickly.</p>
148 deferRowRender : true,
151 * @cfg {Boolean} disableSelection <p><tt>true</tt> to disable selections in the grid. Defaults to <tt>false</tt>.</p>
152 * <p>Ignored if a {@link #selModel SelectionModel} is specified.</p>
155 * @cfg {Boolean} enableColumnResize <tt>false</tt> to turn off column resizing for the whole grid. Defaults to <tt>true</tt>.
158 * @cfg {Boolean} enableColumnHide
159 * Defaults to <tt>true</tt> to enable {@link Ext.grid.Column#hidden hiding of columns}
160 * with the {@link #enableHdMenu header menu}.
162 enableColumnHide : true,
165 * @cfg {Boolean} enableColumnMove Defaults to <tt>true</tt> to enable drag and drop reorder of columns. <tt>false</tt>
166 * to turn off column reordering via drag drop.
168 enableColumnMove : true,
171 * @cfg {Boolean} enableDragDrop <p>Enables dragging of the selected rows of the GridPanel. Defaults to <tt>false</tt>.</p>
172 * <p>Setting this to <b><tt>true</tt></b> causes this GridPanel's {@link #getView GridView} to
173 * create an instance of {@link Ext.grid.GridDragZone}. <b>Note</b>: this is available only <b>after</b>
174 * the Grid has been rendered as the GridView's <tt>{@link Ext.grid.GridView#dragZone dragZone}</tt>
176 * <p>A cooperating {@link Ext.dd.DropZone DropZone} must be created who's implementations of
177 * {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
178 * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop} are able
179 * to process the {@link Ext.grid.GridDragZone#getDragData data} which is provided.</p>
181 enableDragDrop : false,
184 * @cfg {Boolean} enableHdMenu Defaults to <tt>true</tt> to enable the drop down button for menu in the headers.
189 * @cfg {Boolean} hideHeaders True to hide the grid's header. Defaults to <code>false</code>.
192 * @cfg {Object} loadMask An {@link Ext.LoadMask} config or true to mask the grid while
193 * loading. Defaults to <code>false</code>.
198 * @cfg {Number} maxHeight Sets the maximum height of the grid - ignored if <tt>autoHeight</tt> is not on.
201 * @cfg {Number} minColumnWidth The minimum width a column can be resized to. Defaults to <tt>25</tt>.
206 * @cfg {Object} sm Shorthand for <tt>{@link #selModel}</tt>.
209 * @cfg {Object} selModel Any subclass of {@link Ext.grid.AbstractSelectionModel} that will provide
210 * the selection model for the grid (defaults to {@link Ext.grid.RowSelectionModel} if not specified).
213 * @cfg {Ext.data.Store} store The {@link Ext.data.Store} the grid should use as its data source (required).
216 * @cfg {Boolean} stripeRows <tt>true</tt> to stripe the rows. Default is <tt>false</tt>.
217 * <p>This causes the CSS class <tt><b>x-grid3-row-alt</b></tt> to be added to alternate rows of
218 * the grid. A default CSS rule is provided which sets a background colour, but you can override this
219 * with a rule which either overrides the <b>background-color</b> style using the '!important'
220 * modifier, or which uses a CSS selector of higher specificity.</p>
225 * @cfg {Boolean} trackMouseOver True to highlight rows when the mouse is over. Default is <tt>true</tt>
226 * for GridPanel, but <tt>false</tt> for EditorGridPanel.
228 trackMouseOver : true,
231 * @cfg {Array} stateEvents
232 * An array of events that, when fired, should trigger this component to save its state.
233 * Defaults to:<pre><code>
234 * stateEvents: ['columnmove', 'columnresize', 'sortchange', 'groupchange']
236 * <p>These can be any types of events supported by this component, including browser or
237 * custom events (e.g., <tt>['click', 'customerchange']</tt>).</p>
238 * <p>See {@link Ext.Component#stateful} for an explanation of saving and restoring
239 * Component state.</p>
241 stateEvents : ['columnmove', 'columnresize', 'sortchange', 'groupchange'],
244 * @cfg {Object} view The {@link Ext.grid.GridView} used by the grid. This can be set
245 * before a call to {@link Ext.Component#render render()}.
250 * @cfg {Array} bubbleEvents
251 * <p>An array of events that, when fired, should be bubbled to any parent container.
252 * See {@link Ext.util.Observable#enableBubble}.
253 * Defaults to <tt>[]</tt>.
258 * @cfg {Object} viewConfig A config object that will be applied to the grid's UI view. Any of
259 * the config options available for {@link Ext.grid.GridView} can be specified here. This option
260 * is ignored if <tt>{@link #view}</tt> is specified.
270 initComponent : function() {
271 Ext.grid.GridPanel.superclass.initComponent.call(this);
273 if (this.columnLines) {
274 this.cls = (this.cls || '') + ' x-grid-with-col-lines';
276 // override any provided value since it isn't valid
277 // and is causing too many bug reports ;)
278 this.autoScroll = false;
279 this.autoWidth = false;
281 if(Ext.isArray(this.columns)){
282 this.colModel = new Ext.grid.ColumnModel(this.columns);
286 // check and correct shorthanded configs
288 this.store = this.ds;
292 this.colModel = this.cm;
296 this.selModel = this.sm;
299 this.store = Ext.StoreMgr.lookup(this.store);
305 * The raw click event for the entire grid.
306 * @param {Ext.EventObject} e
311 * The raw dblclick event for the entire grid.
312 * @param {Ext.EventObject} e
317 * The raw contextmenu event for the entire grid.
318 * @param {Ext.EventObject} e
323 * The raw mousedown event for the entire grid.
324 * @param {Ext.EventObject} e
329 * The raw mouseup event for the entire grid.
330 * @param {Ext.EventObject} e
335 * The raw mouseover event for the entire grid.
336 * @param {Ext.EventObject} e
341 * The raw mouseout event for the entire grid.
342 * @param {Ext.EventObject} e
347 * The raw keypress event for the entire grid.
348 * @param {Ext.EventObject} e
353 * The raw keydown event for the entire grid.
354 * @param {Ext.EventObject} e
360 * @event cellmousedown
361 * Fires before a cell is clicked
363 * @param {Number} rowIndex
364 * @param {Number} columnIndex
365 * @param {Ext.EventObject} e
369 * @event rowmousedown
370 * Fires before a row is clicked
372 * @param {Number} rowIndex
373 * @param {Ext.EventObject} e
377 * @event headermousedown
378 * Fires before a header is clicked
380 * @param {Number} columnIndex
381 * @param {Ext.EventObject} e
386 * @event groupmousedown
387 * Fires before a group header is clicked. <b>Only applies for grids with a {@link Ext.grid.GroupingView GroupingView}</b>.
389 * @param {String} groupField
390 * @param {String} groupValue
391 * @param {Ext.EventObject} e
396 * @event rowbodymousedown
397 * Fires before the row body is clicked. <b>Only applies for grids with {@link Ext.grid.GridView#enableRowBody enableRowBody} configured.</b>
399 * @param {Number} rowIndex
400 * @param {Ext.EventObject} e
405 * @event containermousedown
406 * Fires before the container is clicked. The container consists of any part of the grid body that is not covered by a row.
408 * @param {Ext.EventObject} e
410 'containermousedown',
414 * Fires when a cell is clicked.
415 * The data for the cell is drawn from the {@link Ext.data.Record Record}
416 * for this row. To access the data in the listener function use the
417 * following technique:
419 function(grid, rowIndex, columnIndex, e) {
420 var record = grid.getStore().getAt(rowIndex); // Get the Record
421 var fieldName = grid.getColumnModel().getDataIndex(columnIndex); // Get field name
422 var data = record.get(fieldName);
426 * @param {Number} rowIndex
427 * @param {Number} columnIndex
428 * @param {Ext.EventObject} e
432 * @event celldblclick
433 * Fires when a cell is double clicked
435 * @param {Number} rowIndex
436 * @param {Number} columnIndex
437 * @param {Ext.EventObject} e
442 * Fires when a row is clicked
444 * @param {Number} rowIndex
445 * @param {Ext.EventObject} e
450 * Fires when a row is double clicked
452 * @param {Number} rowIndex
453 * @param {Ext.EventObject} e
458 * Fires when a header is clicked
460 * @param {Number} columnIndex
461 * @param {Ext.EventObject} e
465 * @event headerdblclick
466 * Fires when a header cell is double clicked
468 * @param {Number} columnIndex
469 * @param {Ext.EventObject} e
474 * Fires when group header is clicked. <b>Only applies for grids with a {@link Ext.grid.GroupingView GroupingView}</b>.
476 * @param {String} groupField
477 * @param {String} groupValue
478 * @param {Ext.EventObject} e
482 * @event groupdblclick
483 * Fires when group header is double clicked. <b>Only applies for grids with a {@link Ext.grid.GroupingView GroupingView}</b>.
485 * @param {String} groupField
486 * @param {String} groupValue
487 * @param {Ext.EventObject} e
491 * @event containerclick
492 * Fires when the container is clicked. The container consists of any part of the grid body that is not covered by a row.
494 * @param {Ext.EventObject} e
498 * @event containerdblclick
499 * Fires when the container is double clicked. The container consists of any part of the grid body that is not covered by a row.
501 * @param {Ext.EventObject} e
506 * @event rowbodyclick
507 * Fires when the row body is clicked. <b>Only applies for grids with {@link Ext.grid.GridView#enableRowBody enableRowBody} configured.</b>
509 * @param {Number} rowIndex
510 * @param {Ext.EventObject} e
514 * @event rowbodydblclick
515 * Fires when the row body is double clicked. <b>Only applies for grids with {@link Ext.grid.GridView#enableRowBody enableRowBody} configured.</b>
517 * @param {Number} rowIndex
518 * @param {Ext.EventObject} e
523 * @event rowcontextmenu
524 * Fires when a row is right clicked
526 * @param {Number} rowIndex
527 * @param {Ext.EventObject} e
531 * @event cellcontextmenu
532 * Fires when a cell is right clicked
534 * @param {Number} rowIndex
535 * @param {Number} cellIndex
536 * @param {Ext.EventObject} e
540 * @event headercontextmenu
541 * Fires when a header is right clicked
543 * @param {Number} columnIndex
544 * @param {Ext.EventObject} e
548 * @event groupcontextmenu
549 * Fires when group header is right clicked. <b>Only applies for grids with a {@link Ext.grid.GroupingView GroupingView}</b>.
551 * @param {String} groupField
552 * @param {String} groupValue
553 * @param {Ext.EventObject} e
557 * @event containercontextmenu
558 * Fires when the container is right clicked. The container consists of any part of the grid body that is not covered by a row.
560 * @param {Ext.EventObject} e
562 'containercontextmenu',
564 * @event rowbodycontextmenu
565 * Fires when the row body is right clicked. <b>Only applies for grids with {@link Ext.grid.GridView#enableRowBody enableRowBody} configured.</b>
567 * @param {Number} rowIndex
568 * @param {Ext.EventObject} e
570 'rowbodycontextmenu',
573 * Fires when the body element is scrolled
574 * @param {Number} scrollLeft
575 * @param {Number} scrollTop
579 * @event columnresize
580 * Fires when the user resizes a column
581 * @param {Number} columnIndex
582 * @param {Number} newSize
587 * Fires when the user moves a column
588 * @param {Number} oldIndex
589 * @param {Number} newIndex
594 * Fires when the grid's store sort changes
596 * @param {Object} sortInfo An object with the keys field and direction
601 * Fires when the grid's grouping changes (only applies for grids with a {@link Ext.grid.GroupingView GroupingView})
603 * @param {String} groupField A string with the grouping field, null if the store is not grouped.
608 * Fires when the grid is reconfigured with a new store and/or column model.
610 * @param {Ext.data.Store} store The new store
611 * @param {Ext.grid.ColumnModel} colModel The new column model
616 * Fires when the grid view is available (use this for selecting a default row).
624 onRender : function(ct, position){
625 Ext.grid.GridPanel.superclass.onRender.apply(this, arguments);
627 var c = this.getGridEl();
629 this.el.addClass('x-grid-panel');
633 mousedown: this.onMouseDown,
635 dblclick: this.onDblClick,
636 contextmenu: this.onContextMenu
639 this.relayEvents(c, ['mousedown','mouseup','mouseover','mouseout','keypress', 'keydown']);
641 var view = this.getView();
644 this.getSelectionModel().init(this);
648 initEvents : function(){
649 Ext.grid.GridPanel.superclass.initEvents.call(this);
652 this.loadMask = new Ext.LoadMask(this.bwrap,
653 Ext.apply({store:this.store}, this.loadMask));
657 initStateEvents : function(){
658 Ext.grid.GridPanel.superclass.initStateEvents.call(this);
659 this.mon(this.colModel, 'hiddenchange', this.saveState, this, {delay: 100});
662 applyState : function(state){
663 var cm = this.colModel,
671 for(var i = 0, len = cs.length; i < len; i++){
673 c = cm.getColumnById(s.id);
675 colIndex = cm.getIndexById(s.id);
676 cm.setState(colIndex, {
682 cm.moveColumn(colIndex, i);
690 store[store.remoteSort ? 'setDefaultSort' : 'sort'](s.field, s.direction);
697 store.clearGrouping();
702 var o = Ext.apply({}, state);
705 Ext.grid.GridPanel.superclass.applyState.call(this, o);
708 getState : function(){
709 var o = {columns: []},
714 for(var i = 0, c; (c = this.colModel.config[i]); i++){
720 o.columns[i].hidden = true;
723 o.columns[i].sortable = true;
727 ss = store.getSortState();
731 if(store.getGroupState){
732 gs = store.getGroupState();
742 afterRender : function(){
743 Ext.grid.GridPanel.superclass.afterRender.call(this);
745 this.on('bodyresize', v.layout, v);
747 if(this.deferRowRender){
748 if (!this.deferRowRenderTask){
749 this.deferRowRenderTask = new Ext.util.DelayedTask(v.afterRender, this.view);
751 this.deferRowRenderTask.delay(10);
755 this.viewReady = true;
759 * <p>Reconfigures the grid to use a different Store and Column Model
760 * and fires the 'reconfigure' event. The View will be bound to the new
761 * objects and refreshed.</p>
762 * <p>Be aware that upon reconfiguring a GridPanel, certain existing settings <i>may</i> become
763 * invalidated. For example the configured {@link #autoExpandColumn} may no longer exist in the
764 * new ColumnModel. Also, an existing {@link Ext.PagingToolbar PagingToolbar} will still be bound
765 * to the old Store, and will need rebinding. Any {@link #plugins} might also need reconfiguring
766 * with the new data.</p>
767 * @param {Ext.data.Store} store The new {@link Ext.data.Store} object
768 * @param {Ext.grid.ColumnModel} colModel The new {@link Ext.grid.ColumnModel} object
770 reconfigure : function(store, colModel){
771 var rendered = this.rendered;
774 this.loadMask.destroy();
775 this.loadMask = new Ext.LoadMask(this.bwrap,
776 Ext.apply({}, {store:store}, this.initialConfig.loadMask));
780 this.view.initData(store, colModel);
783 this.colModel = colModel;
785 this.view.refresh(true);
787 this.fireEvent('reconfigure', this, store, colModel);
791 onDestroy : function(){
792 if (this.deferRowRenderTask && this.deferRowRenderTask.cancel){
793 this.deferRowRenderTask.cancel();
796 Ext.destroy(this.view, this.loadMask);
797 }else if(this.store && this.store.autoDestroy){
798 this.store.destroy();
800 Ext.destroy(this.colModel, this.selModel);
801 this.store = this.selModel = this.colModel = this.view = this.loadMask = null;
802 Ext.grid.GridPanel.superclass.onDestroy.call(this);
806 processEvent : function(name, e){
807 this.view.processEvent(name, e);
811 onClick : function(e){
812 this.processEvent('click', e);
816 onMouseDown : function(e){
817 this.processEvent('mousedown', e);
821 onContextMenu : function(e, t){
822 this.processEvent('contextmenu', e);
826 onDblClick : function(e){
827 this.processEvent('dblclick', e);
831 walkCells : function(row, col, step, fn, scope){
832 var cm = this.colModel,
833 clen = cm.getColumnCount(),
835 rlen = ds.getCount(),
849 if(fn.call(scope || this, row, col, cm) === true){
867 if(fn.call(scope || this, row, col, cm) === true){
879 * Returns the grid's underlying element.
880 * @return {Element} The element
882 getGridEl : function(){
886 // private for compatibility, overridden by editor grid
887 stopEditing : Ext.emptyFn,
890 * Returns the grid's selection model configured by the <code>{@link #selModel}</code>
891 * configuration option. If no selection model was configured, this will create
892 * and return a {@link Ext.grid.RowSelectionModel RowSelectionModel}.
893 * @return {SelectionModel}
895 getSelectionModel : function(){
897 this.selModel = new Ext.grid.RowSelectionModel(
898 this.disableSelection ? {selectRow: Ext.emptyFn} : null);
900 return this.selModel;
904 * Returns the grid's data store.
905 * @return {Ext.data.Store} The store
907 getStore : function(){
912 * Returns the grid's ColumnModel.
913 * @return {Ext.grid.ColumnModel} The column model
915 getColumnModel : function(){
916 return this.colModel;
920 * Returns the grid's GridView object.
921 * @return {Ext.grid.GridView} The grid view
923 getView : function() {
925 this.view = new Ext.grid.GridView(this.viewConfig);
931 * Called to get grid's drag proxy text, by default returns this.ddText.
932 * @return {String} The text
934 getDragDropText : function(){
935 var count = this.selModel.getCount();
936 return String.format(this.ddText, count, count == 1 ? '' : 's');
940 * @cfg {String/Number} activeItem
944 * @cfg {Boolean} autoDestroy
948 * @cfg {Object/String/Function} autoLoad
952 * @cfg {Boolean} autoWidth
956 * @cfg {Boolean/Number} bufferResize
960 * @cfg {String} defaultType
964 * @cfg {Object} defaults
968 * @cfg {Boolean} hideBorders
976 * @cfg {String} layout
980 * @cfg {Object} layoutConfig
984 * @cfg {Boolean} monitorResize
1016 * @method findByType
1020 * @method getComponent
1028 * @method getUpdater
1048 * @event afterlayout
1056 * @event beforeremove
1067 * @cfg {String} allowDomMove @hide
1070 * @cfg {String} autoEl @hide
1073 * @cfg {String} applyTo @hide
1076 * @cfg {String} autoScroll @hide
1079 * @cfg {String} bodyBorder @hide
1082 * @cfg {String} bodyStyle @hide
1085 * @cfg {String} contentEl @hide
1088 * @cfg {String} disabledClass @hide
1091 * @cfg {String} elements @hide
1094 * @cfg {String} html @hide
1097 * @cfg {Boolean} preventBodyReset
1101 * @property disabled
1105 * @method applyToMarkup
1117 * @method setDisabled
1121 Ext.reg('grid', Ext.grid.GridPanel);