YUI recommends YUI 3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

Yahoo! UI Library

DataTable Widget  2.3.0

Yahoo! UI Library > datatable > YAHOO.widget.Column

Show Private Show Protected

Class YAHOO.widget.Column

The Column class defines and manages attributes of DataTable Columns

Constructor

YAHOO.widget.Column ( oConfigs )
Parameters:
oConfigs <Object> Object literal of configuration values.

Properties

_colspan - private Number

Number of table cells the Column spans.

_minWidth - private Number

Minimum width the Column can support (in pixels). Value is populated only if table is fixedWidth, null otherwise.

_nId - private Number

Unique number assigned at instantiation, indicates original order within ColumnSet.

_nKeyIndex - private Number

Reference to Column's index within its ColumnSet's keys array, or null if not applicable.

_parent - private YAHOO.widget.Column

Column's parent Column instance, or null.

_rowspan - private Number

Number of table rows the Column spans.

_sName - private String

Unique instance name.

_width - private Number

Current offsetWidth of the Column (in pixels).

abbr - String

Column head cell ABBR for accessibility.

children - Object[]

Array of object literals that define children (nested headers) of a Column.

className - String || String[]

Custom CSS class or array of classes to be applied to every cell in the Column.

Column._nCount - private static Number

Internal instance counter.
Default Value: 0

editor - String || HTMLFunction

Defines an editor function, otherwise Column is not editable.

editorOptions - Object

Defines editor options for Column in an object literal of param:value pairs.

formatter - String || HTMLFunction

Defines a format function.

key - String

Associated database field, or null.

label - String

Text or HTML for display as Column's label in the TH element.

resizeable - Boolean

True if Column is resizeable, false otherwise.
Default Value: false

sortable - Boolean

True if Column is sortable, false otherwise.
Default Value: false

sortOptions.defaultOrder - String

Default sort order for Column: "asc" or "desc".
Default Value: null

sortOptions.sortFunction - Function

Custom sort handler.
Default Value: null

width - String

Column width.

Methods

getColspan

Number getColspan ( )
Public accessor returns Column's calculated COLSPAN value.
Returns: Number
Column's COLSPAN value.

getId

Number getId ( )
Returns unique number assigned at instantiation, indicates original order within ColumnSet.
Returns: Number
Column's unique ID number.

getKeyIndex

Number getKeyIndex ( )
Public accessor returns Column's key index within its ColumnSet's keys array, or null if not applicable.
Returns: Number
Column's key index within its ColumnSet keys array, if applicable.

getParent

YAHOO.widget.Column getParent ( )
Public accessor returns Column's parent instance if any, or null otherwise.
Returns: YAHOO.widget.Column
Column's parent instance.

getRowspan

Number getRowspan ( )
Public accessor returns Column's calculated ROWSPAN value.
Returns: Number
Column's ROWSPAN value.

toString

String toString ( )
Public accessor to the unique name of the Column instance.
Returns: String
Column's unique name.


Copyright © 2007 Yahoo! Inc. All rights reserved.