Packagecom.elfgrid.columns
Classpublic class ElfColumnBase
InheritanceElfColumnBase Inheritance com.nbilyk.display.CSSComponent
ImplementsIElfGridColumn
SubclassesElfBooleanColumn, ElfBooleanIconColumn, ElfButtonColumn, ElfDateColumn, ElfEmptyColumn, ElfNumberColumn, ElfStringColumn

ElfColumnBase is an abstract class that handles most of the functionality that an IElfGridColumn must provide. To create a custom column, extend this class and override the



Public Properties
 PropertyDefined by
  cellFactory : IFactory
The cell factory is responsible for creating the cells.
ElfColumnBase
  dataField : String
The name of the field with which to populate the column's data.
ElfColumnBase
  editable : Boolean
If true, items in this column can be edited.
ElfColumnBase
  editorFactory : IFactory
The cell factory is responsible for creating editor cells.
ElfColumnBase
  enterCommitsCell : Boolean
This property determines if the enter key will commit the current value in an edited cell and move to the next cell below the current.
ElfColumnBase
  headerCellFactory : IFactory
The header cell factory is responsible for creating the header cells.
ElfColumnBase
  headerData : Object
The data to be given to the header cell.
ElfColumnBase
  headerText : String
The text to be given to the header cell.
ElfColumnBase
  headerTip : String
If headerTip is set, a toolTip is provided on the header cell to this value.
ElfColumnBase
  labelFunction : Function
labelFunction follows the signature: labelFunction(rowData:Object, column:IElfGridColumn):String
ElfColumnBase
  maxWidth : Number
The maximum width of the column.
ElfColumnBase
  minRowHeight : Number
The minimum row height of item renderers from this column.
ElfColumnBase
  minWidth : Number
The minimum width of the column.
ElfColumnBase
  movable : Boolean
Whether or not this column can be moved by the user.
ElfColumnBase
  multiline : Boolean
If true, the Text created for cellItem will be multiline.
ElfColumnBase
  multilineHeader : Boolean
Whether or not the header label is multiline.
ElfColumnBase
  percentWidth : Number
The percent width of this column.
ElfColumnBase
  preventCellChange : Boolean
[read-only] Whether or not to prevent the tab key and arrow keys to change the selected cell.
ElfColumnBase
  resizable : Boolean
Whether or not this column can be resized by the user.
ElfColumnBase
  selectable : Boolean
If true, this column can be selected.
ElfColumnBase
  selectableHeaderText : Boolean
If true, the text in the header can be selected.
ElfColumnBase
  selectableText : Boolean
If true, the text can be selected.
ElfColumnBase
  sortable : Boolean
Whether or not this column can be sorted by the user.
ElfColumnBase
  sortCaseInsensitive : Boolean
ElfColumnBase
  sortCompareFunction : Function
ElfColumnBase
  sortDescending : Boolean
If true, when the column is first sorted, instead of being sorted ascending (lowest value at the top, highest value on the bottom), the column is sorted descending.
ElfColumnBase
  sortField : String
The name of the property that sorting this column uses for comparison.
ElfColumnBase
  sortNumeric : Object
ElfColumnBase
  tipField : String
If you wish for a tool tip on the cell, set either tipField or tipFunction
ElfColumnBase
  tipFunction : Function
If you wish for a tool tip on the cell, set either tipField or tipFunction tipFunction follows the signature: tipFunction(rowData:Object, column:IElfGridColumn):String
ElfColumnBase
  toolTip : String
If set, this writes the tipFunction to be just a method that always returns toolTip.
ElfColumnBase
  truncateToFit : Boolean
If true, text that doesn't fit in a cell will be truncated with a ...
ElfColumnBase
  truncateToFitHeader : Boolean = true
If true, text that doesn't fit in the header cell will be truncated with a ...
ElfColumnBase
  visible : Boolean
ElfColumnBase
  width : Number
The width of the column.
ElfColumnBase
Public Methods
 MethodDefined by
  
ElfColumnBase
  
commitValueFunction(rowData:Object, cellItem:IListItemRenderer):Boolean
ElfColumnBase
  
createSortField():SortField
When the grid is sorted by this column, this SortField gets used in sorting the grid.
ElfColumnBase
  
getToolTip(rowData:Object):String
Returns a tool tip value to be used when the user's mouse is over the cell with the given rowData.
ElfColumnBase
  
setCellData(gridItem:IElfGridItem, rowData:Object, cellData:Object):void
Sets the data of an IElfGridItem.
ElfColumnBase
  
setEditorCellData(editorGridItem:IElfGridItem, rowData:Object):void
ElfColumnBase
  
setHeaderCellData(gridItem:IElfHeaderGridItem, col:uint):void
Sets the col index of an IElfHeaderGridItem.
ElfColumnBase
  
toString():String
ElfColumnBase
  
validateCellItem(rowData:Object, cellItem:IListItemRenderer):ValidationResultEvent
ElfColumnBase
Protected Methods
 MethodDefined by
  
In ElfColumnBase createCell is the default function the cellFactory points to.
ElfColumnBase
  
ElfColumnBase
  
ElfColumnBase
  
formatData(value:Object):String
No special formatting by default.
ElfColumnBase
Events
 EventSummaryDefined by
    ElfColumnBase
Styles
 StyleDescriptionDefined by
  
cellItemStyleName
Type: String   CSS Inheritance: no
ElfColumnBase
  
editorCellItemStyleName
Type: String   CSS Inheritance: no
ElfColumnBase
  
editorGridItemStyleName
Type: String   CSS Inheritance: no
ElfColumnBase
  
gridItemStyleName
Type: String   CSS Inheritance: no
ElfColumnBase
  
headerCellItemStyleName
Type: String   CSS Inheritance: no
ElfColumnBase
  
headerGridItemStyleName
Type: String   CSS Inheritance: no
ElfColumnBase
Property detail
cellFactoryproperty
cellFactory:IFactory  [read-write]

The cell factory is responsible for creating the cells. This factory should create IElfGridItem objects.

Implementation
    public function get cellFactory():IFactory
    public function set cellFactory(value:IFactory):void
dataFieldproperty 
dataField:String  [read-write]

The name of the field with which to populate the column's data.

Implementation
    public function get dataField():String
    public function set dataField(value:String):void
editableproperty 
editable:Boolean  [read-write]

If true, items in this column can be edited. This only affects user events, explicitly setting this column to be edited will still work.

Implementation
    public function get editable():Boolean
    public function set editable(value:Boolean):void
editorFactoryproperty 
editorFactory:IFactory  [read-write]

The cell factory is responsible for creating editor cells. This factory should create IElfGridItem objects.

Implementation
    public function get editorFactory():IFactory
    public function set editorFactory(value:IFactory):void
enterCommitsCellproperty 
enterCommitsCell:Boolean  [read-write]

This property determines if the enter key will commit the current value in an edited cell and move to the next cell below the current. If this property is not set, we will default it to whatever the multiline property is.

Implementation
    public function get enterCommitsCell():Boolean
    public function set enterCommitsCell(value:Boolean):void
headerCellFactoryproperty 
headerCellFactory:IFactory  [read-write]

The header cell factory is responsible for creating the header cells. This factory should create IElfHeaderGridItem objects.

Implementation
    public function get headerCellFactory():IFactory
    public function set headerCellFactory(value:IFactory):void
headerDataproperty 
headerData:Object  [read-write]

The data to be given to the header cell.

Implementation
    public function get headerData():Object
    public function set headerData(value:Object):void
headerTextproperty 
headerText:String  [read-write]

The text to be given to the header cell.

Implementation
    public function get headerText():String
    public function set headerText(value:String):void
headerTipproperty 
headerTip:String  [read-write]

If headerTip is set, a toolTip is provided on the header cell to this value.

Implementation
    public function get headerTip():String
    public function set headerTip(value:String):void
labelFunctionproperty 
public var labelFunction:Function

labelFunction follows the signature: labelFunction(rowData:Object, column:IElfGridColumn):String

maxWidthproperty 
maxWidth:Number  [read-write]

The maximum width of the column. This property is optional.

Implementation
    public function get maxWidth():Number
    public function set maxWidth(value:Number):void
minRowHeightproperty 
public var minRowHeight:Number

The minimum row height of item renderers from this column.

minWidthproperty 
minWidth:Number  [read-write]

The minimum width of the column. This should not be NaN or < 0.

Implementation
    public function get minWidth():Number
    public function set minWidth(value:Number):void
movableproperty 
movable:Boolean  [read-write]

Whether or not this column can be moved by the user. Note that this does not affect whether or not the column can be moved through ElfDataGridBase.moveColumn. If a column is not movable, you would typically want to place the column on one of the sides. For example, if columns 0 and 1 are not movable, and columns 3 and 4 are, columns 3 and 4 cannot be moved before 0 or 1.

Implementation
    public function get movable():Boolean
    public function set movable(value:Boolean):void
multilineproperty 
multiline:Boolean  [read-write]

If true, the Text created for cellItem will be multiline.

Implementation
    public function get multiline():Boolean
    public function set multiline(value:Boolean):void
multilineHeaderproperty 
multilineHeader:Boolean  [read-write]

Whether or not the header label is multiline. If this is true, consider increasing minWidth to avoid broken words.

Implementation
    public function get multilineHeader():Boolean
    public function set multilineHeader(value:Boolean):void
percentWidthproperty 
percentWidth:Number  [read-write]

The percent width of this column.

Implementation
    public function get percentWidth():Number
    public function set percentWidth(value:Number):void
preventCellChangeproperty 
preventCellChange:Boolean  [read-only]

Whether or not to prevent the tab key and arrow keys to change the selected cell.

Implementation
    public function get preventCellChange():Boolean
resizableproperty 
resizable:Boolean  [read-write]

Whether or not this column can be resized by the user. Note that this does not affect whether or not the column can be resized through ElfDataGrid.resizeColumnToWidth. This column will still also resize in response to other column resizing. To prevent that, set the minWidth and maxWidth to the same value.

Implementation
    public function get resizable():Boolean
    public function set resizable(value:Boolean):void
selectableproperty 
selectable:Boolean  [read-write]

If true, this column can be selected. If false, tab and keyboard selection changes will pass over this column. This only affects user events, explicitly setting this column to be selected will still work.

Implementation
    public function get selectable():Boolean
    public function set selectable(value:Boolean):void
selectableHeaderTextproperty 
public var selectableHeaderText:Boolean

If true, the text in the header can be selected. This only makes sense if movable is false, otherwise a select action will be confused with a drag action.

selectableTextproperty 
public var selectableText:Boolean

If true, the text can be selected.

sortableproperty 
sortable:Boolean  [read-write]

Whether or not this column can be sorted by the user. Note that this does not affect whether or not the column can be sorted through ElfDataGridBase.sortByColumn.

Implementation
    public function get sortable():Boolean
    public function set sortable(value:Boolean):void
sortCaseInsensitiveproperty 
public var sortCaseInsensitive:Boolean

sortCompareFunctionproperty 
public var sortCompareFunction:Function

sortDescendingproperty 
public var sortDescending:Boolean

If true, when the column is first sorted, instead of being sorted ascending (lowest value at the top, highest value on the bottom), the column is sorted descending.

sortFieldproperty 
sortField:String  [read-write]

The name of the property that sorting this column uses for comparison. If not set, dataField is used.

Implementation
    public function get sortField():String
    public function set sortField(value:String):void
sortNumericproperty 
public var sortNumeric:Object

tipFieldproperty 
public var tipField:String

If you wish for a tool tip on the cell, set either tipField or tipFunction

See also

tipFunctionproperty 
public var tipFunction:Function

If you wish for a tool tip on the cell, set either tipField or tipFunction tipFunction follows the signature: tipFunction(rowData:Object, column:IElfGridColumn):String

See also

toolTipproperty 
toolTip:String  [read-write]

If set, this writes the tipFunction to be just a method that always returns toolTip.

Implementation
    public function get toolTip():String
    public function set toolTip(value:String):void
truncateToFitproperty 
public var truncateToFit:Boolean

If true, text that doesn't fit in a cell will be truncated with a ...

See also

truncateToFitHeaderproperty 
public var truncateToFitHeader:Boolean = true

If true, text that doesn't fit in the header cell will be truncated with a ...

See also

visibleproperty 
visible:Boolean  [read-write]

This property can be used as the source for data binding.

Implementation
    public function get visible():Boolean
    public function set visible(value:Boolean):void
widthproperty 
width:Number  [read-write]

The width of the column. Use either this or percentWidth, but not both.

Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor detail
ElfColumnBase()constructor
public function ElfColumnBase()
Method detail
commitValueFunction()method
public function commitValueFunction(rowData:Object, cellItem:IListItemRenderer):BooleanParameters
rowData:Object
 
cellItem:IListItemRenderer

Returns
Boolean
createCell()method 
protected function createCell():IElfGridItem

In ElfColumnBase createCell is the default function the cellFactory points to.

Returns
IElfGridItem
createEditorCell()method 
protected function createEditorCell():IElfGridItem

Returns
IElfGridItem
createHeaderCell()method 
protected function createHeaderCell():IElfHeaderGridItem

Returns
IElfHeaderGridItem
createSortField()method 
public function createSortField():SortField

When the grid is sorted by this column, this SortField gets used in sorting the grid. If no Sort was explicitly set, the Sort object will be created based on the sortField or dataField, sortCaseInsensitive, sortDescending, and sortNumeric.

Returns
SortField
formatData()method 
protected function formatData(value:Object):String

No special formatting by default. Override this method to apply a formatter.

Parameters
value:Object

Returns
String
getToolTip()method 
public function getToolTip(rowData:Object):String

Returns a tool tip value to be used when the user's mouse is over the cell with the given rowData.

Parameters
rowData:Object

Returns
String
setCellData()method 
public function setCellData(gridItem:IElfGridItem, rowData:Object, cellData:Object):void

Sets the data of an IElfGridItem.

Parameters
gridItem:IElfGridItem — A recycled cell in the grid.
 
rowData:Object — The element of the grid's dataProvider, This function should be able to handle an empty cell, where rowData is null.
 
cellData:Object
setEditorCellData()method 
public function setEditorCellData(editorGridItem:IElfGridItem, rowData:Object):voidParameters
editorGridItem:IElfGridItem
 
rowData:Object
setHeaderCellData()method 
public function setHeaderCellData(gridItem:IElfHeaderGridItem, col:uint):void

Sets the col index of an IElfHeaderGridItem. This allows you to change styling on different columns on recycled elf header grid items.

Parameters
gridItem:IElfHeaderGridItem
 
col:uint
toString()method 
public override function toString():String

Returns
String
validateCellItem()method 
public function validateCellItem(rowData:Object, cellItem:IListItemRenderer):ValidationResultEventParameters
rowData:Object
 
cellItem:IListItemRenderer

Returns
ValidationResultEvent
Event detail
columnVisibilityChangeevent 
Event object type: com.elfgrid.events.ElfColumnEvent