|
| PropertyColumnModel( Ext.grid.Grid grid , Object source )
+ | PropertyColumnModel |
| addEvents( Object|String o , string Optional. )
+ :
voidAdds the specified events to the list of events which this Observable may fire. Adds the specified events to the list of events which this Observable may fire. | Observable |
| addListener( String eventName , Function handler , [Object scope ], [Object options ] )
- :
+Usage:this.addEvents('storeloaded', 'storecleared'); Returns: | Observable |
| addListener( String eventName , Function handler , [Object scope ], [Object options ] )
+ :
voidAppends an event handler to this object. Appends an event handler to this object. Parameters:eventName : StringThe name of the event to listen for. handler : FunctionThe method the event invokes. scope : Object(optional) The scope (this reference) in which the handler function is executed.
If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration.
properties. This may contain any of the following properties:
@@ -124,68 +124,68 @@ Or a shorthand syntax:
'mouseover' : this.onMouseOver,
'mouseout' : this.onMouseOut,
scope: this
-}); Returns: | Observable |
| destroy()
- :
- voidDestroys this column model by purging any event listeners, and removing any editors. Destroys this column model by purging any event listeners, and removing any editors. | ColumnModel |
| enableBubble( String/Array events )
- :
- voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
-this.getBubbleTarget() if present... Enables events fired by this Observable to bubble up an owner hierarchy by calling
-this.getBubbleTarget() if present. There is no implementation in the Observable base class.
- This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
-implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
-access the required target more quickly.
- Example: Ext.override(Ext.form.Field, {
- // Add functionality to Field's initComponent to enable the change event to bubble
- initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
- this.enableBubble('change');
- }),
-
- // We know that we want Field's events to bubble directly to the FormPanel.
- getBubbleTarget : function() {
- if (!this.formPanel) {
- this.formPanel = this.findParentByType('form');
- }
- return this.formPanel;
- }
-});
-
-var myForm = new Ext.formPanel({
- title: 'User Details',
- items: [{
- ...
- }],
- listeners: {
- change: function() {
- // Title goes red if form has been modified.
- myForm.header.setStyle('color', 'red');
- }
- }
-});
| Observable |
| findColumnIndex( String col )
- :
- NumberFinds the index of the first matching column for the given dataIndex. Finds the index of the first matching column for the given dataIndex. Parameters:col : StringThe dataIndex to find Returns: | ColumnModel |
| fireEvent( String eventName , Object... args )
- :
- BooleanFires the specified event with the passed parameters (minus the event name).
+}); Returns: | Observable |
| destroy()
+ :
+ voidDestroys this column model by purging any event listeners, and removing any editors. Destroys this column model by purging any event listeners, and removing any editors. | ColumnModel |
| enableBubble( String/Array events )
+ :
+ voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present.... Enables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present. There is no implementation in the Observable base class.
+ This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.
+ Example: Ext.override(Ext.form.Field, {
+ // Add functionality to Field's initComponent to enable the change event to bubble
+ initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+ this.enableBubble('change');
+ }),
+
+ // We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget : function() {
+ if (!this.formPanel) {
+ this.formPanel = this.findParentByType('form');
+ }
+ return this.formPanel;
+ }
+});
+
+var myForm = new Ext.formPanel({
+ title: 'User Details',
+ items: [{
+ ...
+ }],
+ listeners: {
+ change: function() {
+ // Title goes red if form has been modified.
+ myForm.header.setStyle('color', 'red');
+ }
+ }
+});
| Observable |
| findColumnIndex( String col )
+ :
+ NumberFinds the index of the first matching column for the given dataIndex. Finds the index of the first matching column for the given dataIndex. Parameters:col : StringThe dataIndex to find Returns: | ColumnModel |
| fireEvent( String eventName , Object... args )
+ :
+ BooleanFires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse... | Observable |
| getCellEditor( Number colIndex , Number rowIndex )
- :
- Ext.EditorReturns the editor defined for the cell/column. Returns the editor defined for the cell/column. Parameters:colIndex : NumberThe column index rowIndex : NumberThe row index Returns: | ColumnModel |
| getColumnById( String id )
- :
- ObjectReturns the column for a specified id. Returns the column for a specified id. | ColumnModel |
| getColumnCount( Boolean visibleOnly )
- :
- NumberReturns the number of columns. Returns the number of columns. | ColumnModel |
| getColumnHeader( Number col )
- :
- StringReturns the header for the specified column. Returns the header for the specified column. Parameters:col : NumberThe column index Returns: | ColumnModel |
| getColumnId( Number index )
- :
- StringReturns the id of the column at the specified index. Returns the id of the column at the specified index. Parameters:index : NumberThe column index Returns: | ColumnModel |
| getColumnTooltip( Number col )
- :
- StringReturns the tooltip for the specified column. Returns the tooltip for the specified column. Parameters:col : NumberThe column index Returns: | ColumnModel |
| getColumnWidth( Number col )
- :
- NumberReturns the width for the specified column. Returns the width for the specified column. Parameters:col : NumberThe column index Returns: | ColumnModel |
| getColumnsBy( Function fn , [Object scope ] )
- :
- ArrayReturns the column configs that return true by the passed function that is called
-with (columnConfig, index)
+by calling enableBubble. | Observable |
| getCellEditor( Number colIndex , Number rowIndex )
+ :
+ Ext.EditorReturns the editor defined for the cell/column. Returns the editor defined for the cell/column. Parameters:colIndex : NumberThe column index rowIndex : NumberThe row index Returns: | ColumnModel |
| getColumnById( String id )
+ :
+ ObjectReturns the column for a specified id. Returns the column for a specified id. | ColumnModel |
| getColumnCount( Boolean visibleOnly )
+ :
+ NumberReturns the number of columns. Returns the number of columns. | ColumnModel |
| getColumnHeader( Number col )
+ :
+ StringReturns the header for the specified column. Returns the header for the specified column. Parameters:col : NumberThe column index Returns: | ColumnModel |
| getColumnId( Number index )
+ :
+ StringReturns the id of the column at the specified index. Returns the id of the column at the specified index. Parameters:index : NumberThe column index Returns: | ColumnModel |
| getColumnTooltip( Number col )
+ :
+ StringReturns the tooltip for the specified column. Returns the tooltip for the specified column. Parameters:col : NumberThe column index Returns: | ColumnModel |
| getColumnWidth( Number col )
+ :
+ NumberReturns the width for the specified column. Returns the width for the specified column. Parameters:col : NumberThe column index Returns: | ColumnModel |
| getColumnsBy( Function fn , [Object scope ] )
+ :
+ ArrayReturns the column configs that return true by the passed function that is called
+with (columnConfig, index)
// retur... Returns the column configs that return true by the passed function that is called
with (columnConfig, index)
// returns an array of column config objects for all hidden columns
@@ -193,24 +193,24 @@ with (columnConfig, index)
return c.hidden;
});
| ColumnModel |
| getDataIndex( Number col )
- :
- StringReturns the dataIndex for the specified column.
-// Get field name for the column
+is executed. Defaults to this ColumnModel. Returns: | ColumnModel |
| getDataIndex( Number col )
+ :
+ StringReturns the dataIndex for the specified column.
+// Get field name for the column
var fieldName = grid.getColumnModel(... Returns the dataIndex for the specified column.
// Get field name for the column
-var fieldName = grid.getColumnModel().getDataIndex(columnIndex);
Parameters:col : NumberThe column index Returns:String The column's dataIndex
| ColumnModel |
| getIndexById( String id )
- :
- NumberReturns the index for a specified column id. Returns the index for a specified column id. | ColumnModel |
| getRenderer( Number col )
- :
- FunctionReturns the rendering (formatting) function defined for the column. Returns the rendering (formatting) function defined for the column. Parameters:col : NumberThe column index. Returns: | ColumnModel |
| getTotalWidth( Boolean includeHidden )
- :
- NumberReturns the total width of all columns. Returns the total width of all columns. | ColumnModel |
| hasListener( String eventName )
- :
- BooleanChecks to see if this object has any listeners for a specified event Checks to see if this object has any listeners for a specified event | Observable |
| isCellEditable( Number colIndex , Number rowIndex )
- :
- BooleanReturns true if the cell is editable.
-var store = new Ext.data.Store({...});
+ var fieldName = grid.getColumnModel().getDataIndex(columnIndex); Parameters:col : NumberThe column index Returns:String The column's dataIndex
| ColumnModel |
| getIndexById( String id )
+ :
+ NumberReturns the index for a specified column id. Returns the index for a specified column id. | ColumnModel |
| getRenderer( Number col )
+ :
+ FunctionReturns the rendering (formatting) function defined for the column. Returns the rendering (formatting) function defined for the column. Parameters:col : NumberThe column index. Returns: | ColumnModel |
| getTotalWidth( Boolean includeHidden )
+ :
+ NumberReturns the total width of all columns. Returns the total width of all columns. | ColumnModel |
| hasListener( String eventName )
+ :
+ BooleanChecks to see if this object has any listeners for a specified event Checks to see if this object has any listeners for a specified event | Observable |
| isCellEditable( Number colIndex , Number rowIndex )
+ :
+ BooleanReturns true if the cell is editable.
+var store = new Ext.data.Store({...});
var colModel = new Ext.grid.ColumnModel(... Returns true if the cell is editable.
var store = new Ext.data.Store({...});
var colModel = new Ext.grid.ColumnModel({
@@ -227,65 +227,65 @@ var colModel = new Ext.grid.ColumnModel(...
Returns true
store: store,
colModel: colModel,
...
-}); Parameters:colIndex : NumberThe column index rowIndex : NumberThe row index Returns: | ColumnModel |
| isFixed( Number colIndex )
- :
- BooleanReturns true if the column is fixed,
+}); Parameters:colIndex : NumberThe column index rowIndex : NumberThe row index Returns: | ColumnModel |
| isFixed( Number colIndex )
+ :
+ BooleanReturns true if the column is fixed,
false otherwise. Returns true if the column is fixed ,
- false otherwise. Parameters:colIndex : NumberThe column index Returns: | ColumnModel |
| isHidden( Number colIndex )
- :
- BooleanReturns true if the column is hidden,
+ false otherwise. Parameters:colIndex : NumberThe column index Returns: | ColumnModel |
| isHidden( Number colIndex )
+ :
+ BooleanReturns true if the column is hidden,
false otherwise. Returns true if the column is hidden ,
- false otherwise. Parameters:colIndex : NumberThe column index Returns: | ColumnModel |
| isMenuDisabled( Number col )
- :
- BooleanReturns true if the specified column menu is disabled. Returns true if the specified column menu is disabled. Parameters:col : NumberThe column index Returns: | ColumnModel |
| isResizable()
- :
- BooleanReturns true if the column can be resized Returns true if the column can be resized | ColumnModel |
| isSortable( Number col )
- :
- BooleanReturns true if the specified column is sortable. Returns true if the specified column is sortable. Parameters:col : NumberThe column index Returns: | ColumnModel |
| moveColumn( Number oldIndex , Number newIndex )
- :
- voidMoves a column from one position to another. Moves a column from one position to another. | ColumnModel |
| on( String eventName , Function handler , [Object scope ], [Object options ] )
- :
+false otherwise.Parameters:colIndex : NumberThe column index Returns: | ColumnModel |
| isMenuDisabled( Number col )
+ :
+ BooleanReturns true if the specified column menu is disabled. Returns true if the specified column menu is disabled. Parameters:col : NumberThe column index Returns: | ColumnModel |
| isResizable()
+ :
+ BooleanReturns true if the column can be resized Returns true if the column can be resized | ColumnModel |
| isSortable( Number col )
+ :
+ BooleanReturns true if the specified column is sortable. Returns true if the specified column is sortable. Parameters:col : NumberThe column index Returns: | ColumnModel |
| moveColumn( Number oldIndex , Number newIndex )
+ :
+ voidMoves a column from one position to another. Moves a column from one position to another. | ColumnModel |
| on( String eventName , Function handler , [Object scope ], [Object options ] )
+ :
voidAppends an event handler to this object (shorthand for addListener.) Appends an event handler to this object (shorthand for addListener.) Parameters:eventName : StringThe type of event to listen for handler : FunctionThe method the event invokes scope : Object(optional) The scope (this reference) in which the handler function is executed.
-If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration. Returns: | Observable |
| purgeListeners()
- :
- voidRemoves all listeners for this object Removes all listeners for this object | Observable |
| relayEvents( Object o , Array events )
- :
- voidRelays selected events from the specified Observable as if the events were fired by this. Relays selected events from the specified Observable as if the events were fired by this. | Observable |
| removeListener( String eventName , Function handler , [Object scope ] )
- :
- voidRemoves an event handler. Removes an event handler. | Observable |
| resumeEvents()
- :
- voidResume firing events. (see suspendEvents)
-If events were suspended using the queueSuspended parameter, then all
+If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration. Returns: | Observable |
| purgeListeners()
+ :
+ voidRemoves all listeners for this object Removes all listeners for this object | Observable |
| relayEvents( Object o , Array events )
+ :
+ voidRelays selected events from the specified Observable as if the events were fired by this. Relays selected events from the specified Observable as if the events were fired by this. | Observable |
| removeListener( String eventName , Function handler , [Object scope ] )
+ :
+ voidRemoves an event handler. Removes an event handler. | Observable |
| resumeEvents()
+ :
+ voidResume firing events. (see suspendEvents)
+If events were suspended using the queueSuspended parameter, then all
event... Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
-events fired during event suspension will be sent to any listeners now. | Observable |
| setColumnHeader( Number col , String header )
- :
- voidSets the header for a column. Sets the header for a column. Parameters:col : NumberThe column index header : StringThe new header Returns: | ColumnModel |
| setColumnTooltip( Number col , String tooltip )
- :
- voidSets the tooltip for a column. Sets the tooltip for a column. Parameters:col : NumberThe column index tooltip : StringThe new tooltip Returns: | ColumnModel |
| setColumnWidth( Number col , Number width , Boolean suppressEvent )
- :
+events fired during event suspension will be sent to any listeners now. | Observable |
| setColumnHeader( Number col , String header )
+ :
+ voidSets the header for a column. Sets the header for a column. Parameters:col : NumberThe column index header : StringThe new header Returns: | ColumnModel |
| setColumnTooltip( Number col , String tooltip )
+ :
+ voidSets the tooltip for a column. Sets the tooltip for a column. Parameters:col : NumberThe column index tooltip : StringThe new tooltip Returns: | ColumnModel |
| setColumnWidth( Number col , Number width , Boolean suppressEvent )
+ :
voidSets the width for a column. Sets the width for a column. Parameters:col : NumberThe column index width : NumberThe new width suppressEvent : BooleanTrue to suppress firing the widthchange
-event. Defaults to false. Returns: | ColumnModel |
| setConfig( Array config , Boolean initial )
- :
- voidReconfigures this column model according to the passed Array of column definition objects.
+event. Defaults to false. Returns: | ColumnModel |
| setConfig( Array config , Boolean initial )
+ :
+ voidReconfigures this column model according to the passed Array of column definition objects.
For a description of the i... Reconfigures this column model according to the passed Array of column definition objects.
For a description of the individual properties of a column definition object, see the
Config Options.
Causes the configchange event to be fired. A GridPanel
using this ColumnModel will listen for this event and refresh its UI automatically. | ColumnModel |
| setDataIndex( Number col , String dataIndex )
- :
- voidSets the dataIndex for a column. Sets the dataIndex for a column. Parameters:col : NumberThe column index dataIndex : StringThe new dataIndex Returns: | ColumnModel |
| setEditable( Number col , Boolean editable )
- :
- voidSets if a column is editable. Sets if a column is editable. | ColumnModel |
| setEditor( Number col , Object editor )
- :
- voidSets the editor for a column and destroys the prior editor. Sets the editor for a column and destroys the prior editor. Parameters:col : NumberThe column index editor : ObjectThe editor object Returns: | ColumnModel |
| setHidden( Number colIndex , Boolean hidden )
- :
- voidSets if a column is hidden.
+and destroys existing editors. Returns: | ColumnModel |
| setDataIndex( Number col , String dataIndex )
+ :
+ voidSets the dataIndex for a column. Sets the dataIndex for a column. Parameters:col : NumberThe column index dataIndex : StringThe new dataIndex Returns: | ColumnModel |
| setEditable( Number col , Boolean editable )
+ :
+ voidSets if a column is editable. Sets if a column is editable. | ColumnModel |
| setEditor( Number col , Object editor )
+ :
+ voidSets the editor for a column and destroys the prior editor. Sets the editor for a column and destroys the prior editor. Parameters:col : NumberThe column index editor : ObjectThe editor object Returns: | ColumnModel |
| setHidden( Number colIndex , Boolean hidden )
+ :
+ voidSets if a column is hidden.
myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first column). Sets if a column is hidden.
- myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first column).
| ColumnModel |
| setRenderer( Number col , Function fn )
- :
- voidSets the rendering (formatting) function for a column. See Ext.util.Format for some
+ myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first column).
| ColumnModel |
| setRenderer( Number col , Function fn )
+ :
+ voidSets the rendering (formatting) function for a column. See Ext.util.Format for some
default formatting functions. Sets the rendering (formatting) function for a column. See Ext.util.Format for some
default formatting functions. Parameters:col : NumberThe column index fn : FunctionThe function to use to process the cell's raw data
to return HTML markup for the grid view. The render function is called with
@@ -298,23 +298,23 @@ the following parameters: Returns: | ColumnModel |
| suspendEvents( Boolean queueSuspended )
- :
+store : Ext.data.StoreThe Ext.data.Store object from which the Record was extracted. Returns: | ColumnModel |
| suspendEvents( Boolean queueSuspended )
+ :
voidSuspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:queueSuspended : BooleanPass as true to queue up suspended events to be fired
-after the resumeEvents call instead of discarding all suspended events; Returns: | Observable |
| un( String eventName , Function handler , [Object scope ] )
- :
- voidRemoves an event handler (shorthand for removeListener.) | Observable |