Yahoo! UI Library

datatable  3.3.0

Yahoo! UI Library > datatable > Column
Search:
 
Filters

Class Column - extends Widget

The Column class defines and manages attributes of Columns for DataTable.

Constructor

Column ( )

Properties

colSpan - Number

Number of cells the header spans. Value is set by Columnset code.
Default Value: 1

headers - String[]

Array of TH IDs associated with this column, for TD "headers" attribute. Value is set by Columnset code

keyIndex - Number

Reference to Column's current position index within its Columnset's keys array, if applicable. This property only applies to non-nested and bottom- level child Columns. Value is set by Columnset code.

NAME - static final String

Class name.

parent - Y.Column

Column's parent Column instance, if applicable. Value is set by Columnset code.

rowSpan - Number

Number of rows the header spans. Value is set by Columnset code.
Default Value: 1

thNode - Y.Node

The Node reference to the associated TH element.

Properties inherited from Plugin.Host:

Properties inherited from Attribute:

Properties inherited from Base:

Methods

_afterAbbrChange

private void _afterAbbrChange ( e )
Updates the UI if changes are made to abbr.
Parameters:
e <Event> Custom event for the attribute change.

_defaultField

private void _defaultField ( )
Return field for instance. Defaults to key if one was not provided.

_defaultId

private void _defaultId ( )
Return ID for instance.

_defaultKey

private void _defaultKey ( )
Return key for instance. Defaults to ID if one was not provided.

_defaultLabel

private void _defaultLabel ( )
Return label for instance. Defaults to key if one was not provided.

_getClassnames

private void _getClassnames ( )
Returns classnames for Column.

_uiSetAbbr

protected void _uiSetAbbr ( val )
Updates abbr.
Parameters:
val <String> New abbr.

destructor

private void destructor ( )
Destructor.

initializer

private void initializer ( config )
Initializer.
Parameters:
config <Object> Config object.

syncUI

private void syncUI ( )
Syncs UI to intial state.

Events

abbrChange

abbrChange ( event )
Fires when the value for the configuration attribute 'abbr' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

childrenChange

childrenChange ( event )
Fires when the value for the configuration attribute 'children' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

fieldChange

fieldChange ( event )
Fires when the value for the configuration attribute 'field' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

idChange

idChange ( event )
Fires when the value for the configuration attribute 'id' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

keyChange

keyChange ( event )
Fires when the value for the configuration attribute 'key' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

labelChange

labelChange ( event )
Fires when the value for the configuration attribute 'label' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Configuration Attributes

abbr - String

TH abbr attribute.

children - String

Array of child column definitions (for nested headers).

field - String

Points to underlying data field (for sorting or formatting, for example). Useful when column doesn't hold any data itself, but is just a visual representation of data from another column or record field. Defaults to key.

id - String

Unique internal identifier, used to stamp ID on TH element.

key - String

User-supplied identifier. Defaults to id.

label - String

Display label for column header. Defaults to key.

Configuration attributes inherited from Base:


Copyright © 2011 Yahoo! Inc. All rights reserved.