|
| PropertyColumnModel( Ext.grid.Grid grid , Object source )
- | PropertyColumnModel |
| addEvents( Object object )
+ | PropertyColumnModel |
| addEvents( Object|String o , string Optional. )
:
- voidUsed to define events on this Observable Used to define events on this Observable | Observable |
| addListener( String eventName , Function handler , [Object scope ], [Object options ] )
+ 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 ] )
:
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.
@@ -92,8 +94,8 @@ Using the options argument, it is possible to combine different types of listene
A delayed, one-time listener.
myDataView.on('click', this.onClick, this, {
- single: true,
- delay: 100
+single: true,
+delay: 100
});
Attaching multiple handlers in 1 call
@@ -101,32 +103,64 @@ The method also allows for a single argument to be passed which is a config obje
which specify multiple handlers.
myGridPanel.on({
- 'click' : {
- fn: this.onClick,
- scope: this,
- delay: 100
- },
- 'mouseover' : {
- fn: this.onMouseOver,
- scope: this
- },
- 'mouseout' : {
- fn: this.onMouseOut,
- scope: this
- }
+'click' : {
+ fn: this.onClick,
+ scope: this,
+ delay: 100
+},
+'mouseover' : {
+ fn: this.onMouseOver,
+ scope: this
+},
+'mouseout' : {
+ fn: this.onMouseOut,
+ scope: this
+}
});
Or a shorthand syntax:
myGridPanel.on({
- 'click' : this.onClick,
- 'mouseover' : this.onMouseOver,
- 'mouseout' : this.onMouseOut,
- scope: this
+'click' : this.onClick,
+'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( Object events )
- :
- voidUsed to enable bubbling of events Used to enable bubbling of events | Observable |
| findColumnIndex( String col )
+ 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 )
:
@@ -157,7 +191,9 @@ with (columnConfig, index)
// returns an array of column config objects for all hidden columns
var columns = grid.getColumnModel().getColumnsBy(function(c){
return c.hidden;
-});
Parameters:fn : Functionscope : Object(optional) Returns: | ColumnModel |
| getDataIndex( Number col )
+}); | ColumnModel |
| getDataIndex( Number col )
:
StringReturns the dataIndex for the specified column.
// Get field name for the column
@@ -191,11 +227,15 @@ var colModel = new Ext.grid.ColumnModel(... Returns true
store: store,
colModel: colModel,
...
-}); Parameters:colIndex : NumberThe column index rowIndex : NumberThe row index Returns: | ColumnModel |
| isFixed()
+});Parameters:colIndex : NumberThe column index rowIndex : NumberThe row index Returns: | ColumnModel |
| isFixed( Number colIndex )
:
- voidReturns true if the column width cannot be changed Returns true if the column width cannot be changed | ColumnModel |
| isHidden( 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. Returns true if the column is hidden. Parameters:colIndex : NumberThe column index Returns: | ColumnModel |
| isMenuDisabled( Number col )
+ 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()
:
|