Properties Methods Events Config Options Direct Link

# Class Ext.ux.grid.RowExpander

Package: | Ext.ux.grid
Defined In: | RowExpander.js
Class: | RowExpander
Extends: | Object

Plugin (ptype = 'rowexpander') that adds the ability to have a Column in a grid which enables a second row body which expands/contracts. The expand/contract behavior is configurable to react on clicking of the column, double click of the row, and/or hitting enter while a row is selected.

## Config Options

Config Options | Defined By
--- | ---
| expandOnDblClick : Boolean `true` to toggle a row between expanded/collapsed when double clicked (defaults to `true`). | RowExpander
| expandOnDblClick : Boolean `true` to toggle a row between expanded/collapsed when double clicked (defaults to `true`). | RowExpander
| expandOnEnter : Boolean `true` to toggle selected row(s) between expanded/collapsed when the enter key is pressed (defaults to `true`). | RowExpander
| expandOnEnter : Boolean `true` to toggle selected row(s) between expanded/collapsed when the enter key is pressed (defaults to `true`). | RowExpander

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---

getLockedCount() : Number
Returns the total number of locked columns
Returns the total number of locked columns
Parameters:

- None.

Returns:

- `Number`
  The number of locked columns

RowExpander

getTotalLockedWidth() : Number
Returns the total width of all locked columns
Returns the total width of all locked columns
Parameters:

- None.

Returns:

- `Number`
  The width of all locked columns

RowExpander

isLocked( `Number colIndex` ) : Boolean
Returns true if the given column index is currently locked
Returns true if the given column index is currently locked
Parameters:

- `colIndex` : Number
  The column index

Returns:

- `Boolean`
  True if the column is locked

RowExpander

moveColumn( `Number oldIndex`, `Number newIndex` ) : void
Moves a column from one position to another
Moves a column from one position to another
Parameters:

- `oldIndex` : Number
  The current column index
- `newIndex` : Number
  The destination column index

Returns:

- void

RowExpander

setLocked( `Number colIndex`, `Boolean value`, `Boolean suppressEvent` ) : void
Locks or unlocks a given column
Locks or unlocks a given column
Parameters:

- `colIndex` : Number
  The column index
- `value` : Boolean
  True to lock, false to unlock
- `suppressEvent` : Boolean
  Pass false to cause the columnlockchange event not to fire

Returns:

- void

RowExpander

## Public Events

Event | Defined By
--- | ---

beforecollapse : ( `Object this`, `Object Ext.data.Record`, `Object body`, `Number rowIndex` )
Fires before the row collapses. Have the listener return false to prevent the row from collapsing.
Fires before the row collapses. Have the listener return false to prevent the row from collapsing.
Listeners will be called with the following arguments:

- `this` : Object
  RowExpander object.
- `Ext.data.Record` : Object
  Record for the selected row.
- `body` : Object
  body element for the secondary row.
- `rowIndex` : Number
  The current row index.

RowExpander

beforecollapse : ( `Object this`, `Object Ext.data.Record`, `Object body`, `Number rowIndex` )
Fires before the row collapses. Have the listener return false to prevent the row from collapsing.
Fires before the row collapses. Have the listener return false to prevent the row from collapsing.
Listeners will be called with the following arguments:

- `this` : Object
  RowExpander object.
- `Ext.data.Record` : Object
  Record for the selected row.
- `body` : Object
  body element for the secondary row.
- `rowIndex` : Number
  The current row index.

RowExpander

beforeexpand : ( `Object this`, `Object Ext.data.Record`, `Object body`, `Number rowIndex` )
Fires before the row expands. Have the listener return false to prevent the row from expanding.
Fires before the row expands. Have the listener return false to prevent the row from expanding.
Listeners will be called with the following arguments:

- `this` : Object
  RowExpander object.
- `Ext.data.Record` : Object
  Record for the selected row.
- `body` : Object
  body element for the secondary row.
- `rowIndex` : Number
  The current row index.

RowExpander

beforeexpand : ( `Object this`, `Object Ext.data.Record`, `Object body`, `Number rowIndex` )
Fires before the row expands. Have the listener return false to prevent the row from expanding.
Fires before the row expands. Have the listener return false to prevent the row from expanding.
Listeners will be called with the following arguments:

- `this` : Object
  RowExpander object.
- `Ext.data.Record` : Object
  Record for the selected row.
- `body` : Object
  body element for the secondary row.
- `rowIndex` : Number
  The current row index.

RowExpander

collapse : ( `Object this`, `Object Ext.data.Record`, `Object body`, `Number rowIndex` )
Fires after the row collapses.
Fires after the row collapses.
Listeners will be called with the following arguments:

- `this` : Object
  RowExpander object.
- `Ext.data.Record` : Object
  Record for the selected row.
- `body` : Object
  body element for the secondary row.
- `rowIndex` : Number
  The current row index.

RowExpander

collapse : ( `Object this`, `Object Ext.data.Record`, `Object body`, `Number rowIndex` )
Fires after the row collapses.
Fires after the row collapses.
Listeners will be called with the following arguments:

- `this` : Object
  RowExpander object.
- `Ext.data.Record` : Object
  Record for the selected row.
- `body` : Object
  body element for the secondary row.
- `rowIndex` : Number
  The current row index.

RowExpander

expand : ( `Object this`, `Object Ext.data.Record`, `Object body`, `Number rowIndex` )
Fires after the row expands.
Fires after the row expands.
Listeners will be called with the following arguments:

- `this` : Object
  RowExpander object.
- `Ext.data.Record` : Object
  Record for the selected row.
- `body` : Object
  body element for the secondary row.
- `rowIndex` : Number
  The current row index.

RowExpander

expand : ( `Object this`, `Object Ext.data.Record`, `Object body`, `Number rowIndex` )
Fires after the row expands.
Fires after the row expands.
Listeners will be called with the following arguments:

- `this` : Object
  RowExpander object.
- `Ext.data.Record` : Object
  Record for the selected row.
- `body` : Object
  body element for the secondary row.
- `rowIndex` : Number
  The current row index.

RowExpander