new Column(content, id, opt_datafield, opt_width, opt_datatype, opt_align, opt_renderer)
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
content |
string | header Text | |
id |
string | column id should be unique , if not class will generate a unique id for each column | |
opt_datafield |
string |
<optional> |
field mapping to DataRow field name |
opt_width |
number |
<optional> |
width of column , defaults to 75 |
opt_datatype |
pear.data.Column.DataType |
<optional> |
DataType , default DataType is pear.data.Column.DataType.TEXT |
opt_align |
pear.data.Column.Align |
<optional> |
text Align of column data , defaults to pear.data.Column.Align.LEFT |
opt_renderer |
pear.ui.GridCellRenderer |
<optional> |
Optional GridCellRenderer |
- Source:
Example
new pear.data.Column("header Text",'column-id',275,
pear.data.Column.DataType.NUMBER)
Extends
- goog.events.EventTarget
Members
-
<static> Align :string
-
Align of Column
Type:
- string
- Source:
Properties:
Name Type Default Description LEFTString left Default Alignment , if align is not specified RIGHTstring right -
<static> DataType :string
-
DataType
Type:
- string
- Source:
Properties:
Name Type Default Description NUMBERstring number TEXTstring text BOOLEANstring boolean DATETIMEstring datetime
Methods
-
<protected> disposeInternal()
-
Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects
- Source:
-
getAlign() → {pear.data.Column.Align}
-
Get Align
- Source:
Returns:
Text Align of Column -
getColumnFooterAggregatesFn() → {function}
-
get the Aggregate function
- Source:
Returns:
Callback function for Footer Aggregate- Type
- function
-
getColumnFormatter() → {Object.<function(pear.ui.GridCell), Object>}
-
Get the column formatting function - this function will be called for each DataCell for the column it belong to
- Source:
Returns:
- Type
- Object.<function(pear.ui.GridCell), Object>
-
getDataField() → {string}
-
get Data Field , bound to this column
- Source:
Returns:
- Type
- string
-
getDataType() → {pear.data.Column.DataType}
-
Get DataType of Column
- Source:
Returns:
DataType of Column -
getExtraCSSClasses() → {?Array.<string>}
-
Extra CSS Classes
- Source:
Returns:
- Type
- ?Array.<string>
-
getGridCellRenderer() → {pear.ui.GridCellRenderer}
-
getGridCellRenderer
- Source:
Returns:
column renderer -
getHeaderText() → {string}
-
get Header Text of Column
- Source:
Returns:
header text of column- Type
- string
-
getId() → {string}
-
get Column Id
- Source:
Returns:
- Type
- string
-
getVisibility() → {boolean}
-
get Column visibility
- Source:
Returns:
- Type
- boolean
-
getWidth() → {number}
-
get Column width
- Source:
Returns:
- Type
- number
-
isFrozen() → {boolean}
-
Is Column Frozen
- Source:
Returns:
- Type
- boolean
-
setColumnFooterAggregatesFn(fn)
-
set the Callback function for Footer Aggregates Calculation
Parameters:
Name Type Description fnfunction Aggregate Function - this function fn will be called if footer row is enabled/show and will be called for GridFooterCell which belongs to this Column - Source:
-
setColumnFormatter(fn, opt_scope)
-
Set callback function for formatting all GridCell Data which belongs to this column
Parameters:
Name Type Argument Description fnfunction formatting function - which will be called for every GridCell which belongs to this column opt_scopeObject <optional>
whose scope to call the formatter function. - Source:
Example
function myformatter (GridCell) { // this function is called for every cell // for given column } ... ... column.setColumnFormatter(myformatter); -
setExtraCSSClasses(classes)
-
Extra CSS Classes
Parameters:
Name Type Argument Description classes?Array.<string> <nullable>
- Source:
-
setFrozen(freeze)
-
set column freeze
Parameters:
Name Type Description freezeboolean - Source:
-
setGridCellRenderer(renderer) → {pear.ui.GridCellRenderer}
-
setGridCellRenderer
Parameters:
Name Type Argument Description rendererpear.ui.GridCellRenderer <nullable>
GridCell Renderer - Source:
Returns:
[description] -
setVisibility(visible)
-
set column visibility
Parameters:
Name Type Description visibleboolean - Source:
-
setWidth(width)
-
set width
Parameters:
Name Type Description widthnumber width of column - Source: