Roo.util.Observable Roo.grid.ColumnModel
Package: | Roo.grid |
Defined In: | Roo/grid/ColumnModel.js. |
Class: | ColumnModel |
Extends: | Roo.util.Observable |
var colModel = new Roo.grid.ColumnModel([
{header: "Ticker", width: 60, sortable: true, locked: true},
{header: "Company Name", width: 150, sortable: true},
{header: "Market Cap.", width: 100, sortable: true},
{header: "$ Sales", width: 100, sortable: true, renderer: money},
{header: "Employees", width: 100, sortable: true, resizable: false}
]);
The config options listed for this class are options which may appear in each
individual column definition.
RooJS Fix - column id's are not sequential but use Roo.id() - fixes bugs with layouts.
Options | Defined By | |
---|---|---|
align : String
(Optional) Set the CSS text-align property of the column.
(Optional) Set the CSS text-align property of the column. Defaults to undefined.
|
Roo.grid.ColumnModel | |
cursor : String
(Optional)
(Optional)
|
Roo.grid.ColumnModel | |
dataIndex : String
(Optional) The name of the field in the grid's {link Roo.data.Store}'s
{link Roo.data.Record} definition from which to draw the column's value.
(Optional) The name of the field in the grid's {link Roo.data.Store}'s
{link Roo.data.Record} definition from which to draw the column's value. If not specified, the column's index is used as an index into the Record's data Array. |
Roo.grid.ColumnModel | |
editor : Roo.grid.GridEditor
(Optional) For grid editors - returns the grid editor
(Optional) For grid editors - returns the grid editor
|
Roo.grid.ColumnModel | |
fixed : Boolean
(Optional) True if the column width cannot be changed.
(Optional) True if the column width cannot be changed. Defaults to false.
|
Roo.grid.ColumnModel | |
header : String
The header text to display in the Grid view.
The header text to display in the Grid view.
|
Roo.grid.ColumnModel | |
hidden : Boolean
(Optional) True to hide the column.
(Optional) True to hide the column. Defaults to false.
|
Roo.grid.ColumnModel | |
lg : Number
(Optional)
(Optional)
|
Roo.grid.ColumnModel | |
listeners : Object
list of events and functions to call for this object,
For example :
list of events and functions to call for this object,
For example :
|
Roo.util.Observable | |
locked : Boolean
(Optional) True to lock the column in place while scrolling the Grid.
(Optional) True to lock the column in place while scrolling the Grid. Defaults to false.
|
Roo.grid.ColumnModel | |
md : Number
(Optional)
(Optional)
|
Roo.grid.ColumnModel | |
renderer : Function
(Optional) A function used to generate HTML markup for a cell
given the cell's data value.
(Optional) A function used to generate HTML markup for a cell
given the cell's data value. See {link setRenderer}. If not specified, the default renderer returns the escaped data value. If an object is returned (bootstrap only) then it is treated as a Roo Component object instance, and it is rendered after the initial row is rendered |
Roo.grid.ColumnModel | |
resizable : Boolean
(Optional) False to disable column resizing.
(Optional) False to disable column resizing. Defaults to true.
|
Roo.grid.ColumnModel | |
sm : Number
(Optional)
(Optional)
|
Roo.grid.ColumnModel | |
sortable : Boolean
(Optional) True if sorting is to be allowed on this column.
(Optional) True if sorting is to be allowed on this column.
Defaults to the value of the {link defaultSortable} property. Whether local/remote sorting is used is specified in {link Roo.data.StoreremoteSort}. |
Roo.grid.ColumnModel | |
tooltip : String
(Optional)
(Optional)
|
Roo.grid.ColumnModel | |
width : Number
(Optional) The initial width in pixels of the column.
(Optional) The initial width in pixels of the column. Using this
instead of {link Roo.grid.GridautoSizeColumns} is more efficient. |
Roo.grid.ColumnModel | |
xs : Number
(Optional)
(Optional)
|
Roo.grid.ColumnModel |
Method | Defined By | |
---|---|---|
new Roo.grid.ColumnModel
(Object config)
Create a new Roo.grid.ColumnModel
Create a new Roo.grid.ColumnModel
|
||
addEvents
(Object object)
Used to define events on this Observable
Used to define events on this Observable
|
Roo.util.Observable | |
Appends an event handler to this component
Appends an event handler to this component
|
Roo.util.Observable | |
Roo.grid.ColumnModel | ||
Fires the specified event with the passed parameters (minus the event name).
|
Roo.util.Observable | |
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
getColumnCount
()
:
Number
Returns the number of columns.
Returns the number of columns.
|
Roo.grid.ColumnModel | |
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.util.Observable | ||
Roo.grid.ColumnModel | ||
isFixed
()
Returns true if the column width cannot be changed
Returns true if the column width cannot be changed
|
Roo.grid.ColumnModel | |
Roo.grid.ColumnModel | ||
isResizable
()
:
Boolean
Returns true if the column can be resized
Returns true if the column can be resized
|
Roo.grid.ColumnModel | |
Roo.grid.ColumnModel | ||
Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
|
Roo.util.Observable | |
purgeListeners
()
Removes all listeners for this object
Removes all listeners for this object
|
Roo.util.Observable | |
Roo.util.Observable | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Sets the rendering (formatting) function for a column.
Sets the rendering (formatting) function for a column.
|
Roo.grid.ColumnModel | |
Roo.util.Observable |
Event | Defined By | |
---|---|---|
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel | ||
Roo.grid.ColumnModel |