Observable GridView PivotGridView
Package: | Ext.grid |
Defined In: | PivotGridView.js |
Class: | PivotGridView |
Extends: | GridView |
new Ext.grid.PivotGrid({
viewConfig: {
title: 'My Pivot Grid',
getCellCls: function(value) {
return value > 10 'red' : 'green';
}
}
});
Currently title and getCellCls are the only configuration options accepted by PivotGridView. All other interaction is performed via the PivotGrid class.
Config Options | Defined By | |
---|---|---|
autoFill : Boolean Defaults to false. Specify true to have the column widths re-proportioned
when the grid is initially rendered. The
... Defaults to false. Specify true to have the column widths re-proportioned
when the grid is initially rendered. The
initially configured width of each column will be adjusted
to fit the grid width and prevent horizontal scrolling. If columns are later resized (manually
or programmatically), the other columns in the grid will not be resized to fit the grid width.
See forceFit also. | GridView | |
cellSelector : String The selector used to find cells internally (defaults to 'td.x-grid3-cell') | GridView | |
cellSelectorDepth : Number The number of levels to search for cells in event delegation (defaults to 4) | GridView | |
columnsText : String The text displayed in the 'Columns' menu item (defaults to 'Columns') | GridView | |
deferEmptyText : Boolean True to defer emptyText being applied until the store's
first load (defaults to true). | GridView | |
emptyText : String Default text (html tags are accepted) to display in the grid body when no rows
are available (defaults to ''). This v... Default text (html tags are accepted) to display in the grid body when no rows
are available (defaults to ''). This value will be used to update the mainBody:
| GridView | |
enableRowBody : Boolean True to add a second TR element per row that can be used to provide a row body
that spans beneath the data row. Use ... True to add a second TR element per row that can be used to provide a row body
that spans beneath the data row. Use the getRowClass method's rowParams config to customize the row body. | GridView | |
forceFit : Boolean Defaults to false. Specify true to have the column widths re-proportioned
at all times. The initially configured wi... Defaults to false. Specify true to have the column widths re-proportioned
at all times. The initially configured width of each
column will be adjusted to fit the grid width and prevent horizontal scrolling. If columns are
later resized (manually or programmatically), the other columns in the grid will be resized
to fit the grid width. See autoFill also. | GridView | |
getCellCls : Function Optional function which should return a CSS class name for each cell value. This is useful when
color coding cells ba... Optional function which should return a CSS class name for each cell value. This is useful when
color coding cells based on their value. Defaults to undefined. | PivotGridView | |
headerMenuOpenCls : String The CSS class to add to the header cell when its menu is visible. Defaults to 'x-grid3-hd-menu-open' | GridView | |
headersDisabled : Boolean True to disable the grid column headers (defaults to false).
Use the ColumnModel menuDisabled
config to disable the m... True to disable the grid column headers (defaults to false).
Use the ColumnModel menuDisabled
config to disable the menu for individual columns. While this config is true the
following will be disabled:
| GridView | |
listeners : Object A config object containing one or more event handlers to be added to this
object during initialization. This should ... A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once. DOM events from ExtJs Components While some ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
is usually only done when extra value can be added. For example the DataView's
| Observable | |
markDirty : Boolean True to show the dirty cell indicator when a cell has been modified. Defaults to true. | GridView | |
rowBodySelector : String The selector used to find row bodies internally (defaults to 'div.x-grid3-row') | GridView | |
rowBodySelectorDepth : Number The number of levels to search for row bodies in event delegation (defaults to 10) | GridView | |
rowOverCls : String The CSS class added to each row when it is hovered over. Defaults to 'x-grid3-row-over' | GridView | |
rowSelector : String The selector used to find rows internally (defaults to 'div.x-grid3-row') | GridView | |
rowSelectorDepth : Number The number of levels to search for rows in event delegation (defaults to 10) | GridView | |
scrollOffset : Number The amount of space to reserve for the vertical scrollbar
(defaults to undefined). If an explicit value isn't specifi... The amount of space to reserve for the vertical scrollbar
(defaults to undefined). If an explicit value isn't specified, this will be automatically
calculated. | GridView | |
selectedRowClass : String The CSS class applied to a selected row (defaults to 'x-grid3-row-selected'). An
example overriding the default styli... The CSS class applied to a selected row (defaults to 'x-grid3-row-selected'). An
example overriding the default styling:
Note that this only controls the row, and will not do anything for the text inside it. To style inner
facets (like text) use something like:
| GridView | |
sortAscText : String The text displayed in the 'Sort Ascending' menu item (defaults to 'Sort Ascending') | GridView | |
sortClasses : Array The CSS classes applied to a header when it is sorted. (defaults to ['sort-asc', 'sort-desc']) | GridView | |
sortDescText : String The text displayed in the 'Sort Descending' menu item (defaults to 'Sort Descending') | GridView | |
title : String Optional title to be placed in the top left corner of the PivotGrid. Defaults to an empty string. | PivotGridView |
Property | Defined By | |
---|---|---|
Ext.Template : masterTpl The master template to use when rendering the GridView. Has a default template | PivotGridView | |
bodyTpl : Ext.Template The template to use when rendering the body. Has a default template | GridView | |
cellTpl : Ext.Template The template to use to render each cell. Has a default template | GridView | |
colHeaderCellCls : String The CSS class added to all group header cells. Defaults to 'grid-hd-group-cell' | PivotGridView | |
dragZone : Ext.grid.GridDragZone A customized implementation of a DragZone which provides default implementations
of the template methods of DragZone ... A customized implementation of a DragZone which provides default implementations of the template methods of DragZone to enable dragging of the selected rows of a GridPanel. See Ext.grid.GridDragZone for details. This will only be present:
| GridView | |
headerTitleEl : Ext.Element The element that contains the optional title (top left section of the pivot grid) | PivotGridView | |
headerTpl : Ext.Template The template to use when rendering headers. Has a default template | GridView | |
mainBody : Ext.Element Read-only. The GridView's body Element which encapsulates all rows in the Grid.
This Element is only available after ... Read-only. The GridView's body Element which encapsulates all rows in the Grid.
This Element is only available after the GridPanel has been rendered. | GridView | |
rowHeadersEl : Ext.Element The element containing all row headers | PivotGridView |
Method | Defined By | |
---|---|---|
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. Parameters:
| 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:
| Observable | |
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 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:
Parameters:
| Observable | |
findCellIndex( HTMLElement el )
:
NumberReturn the index of the grid column which contains the passed HTMLElement.
See also findRowIndex Return the index of the grid column which contains the passed HTMLElement. See also findRowIndexParameters:
| GridView | |
findRow( HTMLElement el )
:
HTMLElementReturn the HtmlElement representing the grid row which contains the passed element. Return the HtmlElement representing the grid row which contains the passed element. Parameters:
| GridView | |
findRowBody( HTMLElement el )
:
HTMLElementReturn the HtmlElement representing the grid row body which contains the passed element. Return the HtmlElement representing the grid row body which contains the passed element. Parameters:
| GridView | |
findRowIndex( HTMLElement el )
:
NumberReturn the index of the grid row which contains the passed HTMLElement.
See also findCellIndex Return the index of the grid row which contains the passed HTMLElement.
See also findCellIndex Parameters:
| GridView | |
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... Fires the specified event with the passed parameters (minus the event name). An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget) by calling enableBubble. Parameters:
| Observable | |
focusCell( Number row , Number col )
:
voidFocuses the specified cell. Focuses the specified cell. Parameters:
| GridView | |
focusRow( Number row )
:
voidFocuses the specified row. Focuses the specified row. Parameters:
| GridView | |
getCell( Number row , Number col )
:
HtmlElementReturns the grid's <td> HtmlElement at the specified coordinates. Returns the grid's <td> HtmlElement at the specified coordinates. Parameters:
| GridView | |
getColumnHeaders()
:
Array Returns the headers to be rendered at the top of the grid. Should be a 2-dimensional array, where each item specifies... Returns the headers to be rendered at the top of the grid. Should be a 2-dimensional array, where each item specifies the number
of columns it groups (column in this case refers to normal grid columns). In the example below we have 5 city groups, which are
each part of a continent supergroup. The colspan for each city group refers to the number of normal grid columns that group spans,
so in this case the grid would be expected to have a total of 12 columns:
In the example above we have cities nested under countries. The nesting could be deeper if desired - e.g. Continent -> Country ->
State -> City, or any other structure. The only constaint is that the same depth must be used throughout the structure.Parameters:
| PivotGridView | |
getGridInnerWidth()
:
Number Returns the total internal width available to the grid, taking the scrollbar into account Returns the total internal width available to the grid, taking the scrollbar into account Parameters:
| GridView | |
getHeaderCell( Number index )
:
HtmlElementReturn the <td> HtmlElement which represents the Grid's header cell for the specified column index. Return the <td> HtmlElement which represents the Grid's header cell for the specified column index. Parameters:
| GridView | |
getRow( Number index )
:
HtmlElementReturn the <div> HtmlElement which represents a Grid row for the specified index. Return the <div> HtmlElement which represents a Grid row for the specified index. Parameters:
| GridView | |
getRowClass( Record record , Number index , Object rowParams , Store store )
:
StringOverride this function to apply custom CSS classes to rows during rendering. You can also supply custom
parameters t... Override this function to apply custom CSS classes to rows during rendering. You can also supply custom
parameters to the row template for the current row to customize how it is rendered using the rowParams
parameter. This function should return the CSS class name (or empty string '' for none) that will be added
to the row's wrapping div. To apply multiple class names, simply return them space-delimited within the string
(e.g., 'my-class another-class'). Example usage:
Parameters:
| GridView | |
getRowHeaders()
:
Array Returns the headers to be rendered on the left of the grid. Should be a 2-dimensional array, where each item specifie... Returns the headers to be rendered on the left of the grid. Should be a 2-dimensional array, where each item specifies the number
of rows it groups. In the example below we have 5 city groups, which are each part of a continent supergroup. The rowspan for each
city group refers to the number of normal grid columns that group spans, so in this case the grid would be expected to have a
total of 12 rows:
In the example above we have cities nested under countries. The nesting could be deeper if desired - e.g. Continent -> Country ->
State -> City, or any other structure. The only constaint is that the same depth must be used throughout the structure.Parameters:
| PivotGridView | |
getTotalRowHeaderWidth()
:
Number Returns the total width of all row headers as specified by getRowHeaders Returns the total width of all row headers as specified by getRowHeaders Parameters:
| PivotGridView | |
handleHdMenuClickDefault( Ext.menu.BaseItem item )
:
voidCalled by handleHdMenuClick if any button except a sort ASC/DESC button was clicked. The default implementation provi... Called by handleHdMenuClick if any button except a sort ASC/DESC button was clicked. The default implementation provides
the column hide/show functionality based on the check state of the menu item. A different implementation can be provided
if needed. Parameters:
| GridView | |
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 Parameters:
| Observable | |
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:
| Observable | |
purgeListeners()
:
void Removes all listeners for this object Removes all listeners for this object Parameters:
| Observable | |
refresh( [Boolean headersToo ] )
:
voidRefreshs the grid UI Refreshs the grid UI Parameters:
| PivotGridView | |
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. Parameters:
| Observable | |
removeListener( String eventName , Function handler , [Object scope ] )
:
voidRemoves an event handler. Removes an event handler. Parameters:
| Observable | |
resumeEvents()
:
void Resume 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. Parameters:
| Observable | |
scrollToTop()
:
void Scrolls the grid to the top Scrolls the grid to the top Parameters:
| GridView | |
setTitle( String title )
:
voidSets the title text in the top left segment of the PivotGridView Sets the title text in the top left segment of the PivotGridView Parameters:
| PivotGridView | |
suspendEvents( Boolean queueSuspended )
:
voidSuspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:
| Observable | |
un( String eventName , Function handler , [Object scope ] )
:
voidRemoves an event handler (shorthand for removeListener.) Removes an event handler (shorthand for removeListener.) Parameters:
| Observable |
Event | Defined By | |
---|---|---|
beforerefresh :
( Ext.grid.GridView view )
Internal UI Event. Fired before the view is refreshed. Internal UI Event. Fired before the view is refreshed. Listeners will be called with the following arguments:
| GridView | |
beforerowremoved :
( Ext.grid.GridView view , Number rowIndex , Ext.data.Record record )
Internal UI Event. Fired before a row is removed. Internal UI Event. Fired before a row is removed. Listeners will be called with the following arguments:
| GridView | |
beforerowsinserted :
( Ext.grid.GridView view , Number firstRow , Number lastRow )
Internal UI Event. Fired before rows are inserted. Internal UI Event. Fired before rows are inserted. Listeners will be called with the following arguments:
| GridView | |
refresh :
( Ext.grid.GridView view )
Internal UI Event. Fired after the GridView's body has been refreshed. Internal UI Event. Fired after the GridView's body has been refreshed. Listeners will be called with the following arguments:
| GridView | |
rowremoved :
( Ext.grid.GridView view , Number rowIndex , Ext.data.Record record )
Internal UI Event. Fired after a row is removed. Internal UI Event. Fired after a row is removed. Listeners will be called with the following arguments:
| GridView | |
rowsinserted :
( Ext.grid.GridView view , Number firstRow , Number lastRow )
Internal UI Event. Fired after rows are inserted. Internal UI Event. Fired after rows are inserted. Listeners will be called with the following arguments:
| GridView | |
rowupdated :
( Ext.grid.GridView view , Number firstRow , Ext.data.record record )
Internal UI Event. Fired after a row has been updated. Internal UI Event. Fired after a row has been updated. Listeners will be called with the following arguments:
| GridView |