Properties Methods Events Config Options Direct Link
Observable
  ColumnModel

Class Ext.grid.ColumnModel

Package:Ext.grid
Defined In:ColumnModel.js
Class:ColumnModel
Subclasses:PropertyColumnModel
Extends:Observable
This is the default implementation of a ColumnModel used by the Grid. This class is initialized with an Array of column config objects.

An individual column's config object defines the header string, the Ext.data.Record field the column draws its data from, an otional rendering function to provide customized data formatting, and the ability to apply a CSS class to all cells in a column through its id config option.

Usage:
var colModel = new Ext.grid.ColumnModel([
	{header: "Ticker", width: 60, sortable: 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.

Config Options

Config Options Defined By
  align : String
(optional) Set the CSS text-align property of the column. Defaults to undefined.
ColumnModel
  editor : Ext.form.Field
(optional) The Ext.form.Field to use when editing values in this column if editing is supported by the grid.
ColumnModel
  fixed : Boolean
(optional) True if the column width cannot be changed. Defaults to false.
ColumnModel
  header : String
The header text to display in the Grid view.
ColumnModel
  hidden : Boolean
(optional) True to hide the column. Defaults to false.
ColumnModel
  hideable : Boolean
(optional) Specify as false to prevent the user from hiding this column. Defaults to true.
ColumnModel
  resizable : Boolean
(optional) False to disable column resizing. Defaults to true.
ColumnModel

Public Properties

Property Defined By
  defaultSortable : Boolean
Default sortable of columns which have no sortable specified (defaults to false)
ColumnModel
  defaultWidth : Number
The width of columns which have no width specified (defaults to 100)
ColumnModel
  setConfig : Object
The config passed into the constructor
ColumnModel

Public Methods

Method Defined By

Public Events

Event Defined By