Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gwtext.client.widgets.grid
Class ColumnConfig

    java.lang.Object
      com.gwtext.client.core.JsObject
          com.gwtext.client.core.BaseConfig
              com.gwtext.client.widgets.grid.BaseColumnConfig
                  com.gwtext.client.widgets.grid.ColumnConfig

    public class ColumnConfig

extends BaseColumnConfig

The Grid Column configuration.

See Also:
  `ColumnModel`

Field Summary

Fields inherited from class com.gwtext.client.core.JsObject
`jsObj`

Constructor Summary
`ColumnConfig()` Create a new ColumnConfig.
`ColumnConfig(java.lang.String header, java.lang.String dataIndex)` Create a new ColumnConfig.
`ColumnConfig(java.lang.String header, java.lang.String dataIndex, int width)` Create a new ColumnConfig.
`ColumnConfig(java.lang.String header, java.lang.String dataIndex, int width, boolean sortable)` Create a new ColumnConfig.
`ColumnConfig(java.lang.String header, java.lang.String dataIndex, int width, boolean sortable, Renderer renderer)` Create a new ColumnConfig.
`ColumnConfig(java.lang.String header, java.lang.String dataIndex, int width, boolean sortable, Renderer renderer, java.lang.String id)` Create a new ColumnConfig.

Method Summary
`java.lang.String` | `getCss()`
`java.lang.String` | `getDataIndex()`
`boolean` | `getFixed()`
`java.lang.String` | `getHeader()`
`boolean` | `getHidden()`
`java.lang.String` | `getId()`
`boolean` | `getResizable()`
`boolean` | `getSortable()`
`java.lang.String` | `getTextAlign()`
`java.lang.String` | `getTooltip()`
`int` | `getWidth()`
`void` | `setAlign(TextAlign align)` Set the CSS text-align property of the column.
`void` | `setCss(java.lang.String css)` Sets teh CSS class for the column,
`void` | `setDataIndex(java.lang.String dataIndex)` The name of the field in the grid's `Store`'s `Record` definition from which to draw the column's value.
`void` | `setEditor(GridEditor editor)` Sets the editor for a column.
`void` | `setFixed(boolean fixed)` True to make the column width fixed.
`void` | `setHeader(java.lang.String header)` The header text to display in the Grid view.
`void` | `setHidden(boolean hidden)` True to hide the column.
`void` | `setId(java.lang.String id)` Assigning id to ColumnConfig results in the column dom element having that ID.
`void` | `setRenderer(Renderer renderer)` Sets the rendering (formatting) function for a column.
`void` | `setRenderer(java.lang.String renderer)`
`void` | `setResizable(boolean resizable)` False to disable column resizing.
`void` | `setSortable(boolean sortable)` True if sorting is to be allowed on this column.
`void` | `setTooltip(java.lang.String tooltip)` A text string to use as the column header's tooltip.
`void` | `setWidth(int width)` The initial width in pixels of the column.

Methods inherited from class com.gwtext.client.core.JsObject
`getJsObj, getProperties, isCreated, setJsObj`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ColumnConfig

    public ColumnConfig()

  Create a new ColumnConfig.

### ColumnConfig

    public ColumnConfig(java.lang.String header,
                        java.lang.String dataIndex)

  Create a new ColumnConfig.

  Parameters:
    `header` - the column header
    `dataIndex` - the data index (the field name pf the Store associated with the Grid)

### ColumnConfig

    public ColumnConfig(java.lang.String header,
                        java.lang.String dataIndex,
                        int width)

  Create a new ColumnConfig.

  Parameters:
    `header` - the column header
    `dataIndex` - the data index (the field name pf the Store associated with the Grid)
    `width` - the column width

### ColumnConfig

    public ColumnConfig(java.lang.String header,
                        java.lang.String dataIndex,
                        int width,
                        boolean sortable)

  Create a new ColumnConfig.

  Parameters:
    `header` - the column header
    `dataIndex` - the data index (the field name pf the Store associated with the Grid)
    `width` - the column width
    `sortable` - true for sortable

### ColumnConfig

    public ColumnConfig(java.lang.String header,
                        java.lang.String dataIndex,
                        int width,
                        boolean sortable,
                        Renderer renderer)

  Create a new ColumnConfig.

  Parameters:
    `header` - the column header
    `dataIndex` - the data index (the field name pf the Store associated with the Grid)
    `width` - the column width
    `sortable` - true for sortable
    `renderer` - a renderer to allow custom formating of cells of this column

### ColumnConfig

    public ColumnConfig(java.lang.String header,
                        java.lang.String dataIndex,
                        int width,
                        boolean sortable,
                        Renderer renderer,
                        java.lang.String id)

  Create a new ColumnConfig.

  Parameters:
    `header` - the column header
    `dataIndex` - the data index (the field name pf the Store associated with the Grid)
    `width` - the column width
    `sortable` - true for sortable
    `renderer` - a renderer to allow custom formating of cells of this column
    `id` - the grid ID

Method Detail

### setAlign

    public void setAlign(TextAlign align)

  Set the CSS text-align property of the column. Defaults to undefined.

  Parameters:
    `align` - the text-align position

### getTextAlign

    public java.lang.String getTextAlign()

### setId

    public void setId(java.lang.String id)

  Assigning id to ColumnConfig results in the column dom element having that ID. This is useful to apply custom css to the entire column. (e.g. .x-grid-col-topic b { color:#333 }) .

  Parameters:
    `id` - the column ID

### getId

    public java.lang.String getId()

### setDataIndex

    public void setDataIndex(java.lang.String dataIndex)

  The name of the field in the grid's `Store`'s `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.

  Parameters:
    `dataIndex` - the data index

### getDataIndex

    public java.lang.String getDataIndex()

### setTooltip

    public void setTooltip(java.lang.String tooltip)

  A text string to use as the column header's tooltip. If Quicktips are enabled, this value will be used as the text of the quick tip, otherwise it will be set as the header's HTML title attribute. Defaults to ''.

  Parameters:
    `tooltip` - the tooltip

### getTooltip

    public java.lang.String getTooltip()

### setCss

    public void setCss(java.lang.String css)

  Sets teh CSS class for the column,

  Parameters:
    `css` - the CSS class

### getCss

    public java.lang.String getCss()

### setHeader

    public void setHeader(java.lang.String header)

  The header text to display in the Grid view. You can use arbitrary html for the header.

  Parameters:
    `header` - the column header

### getHeader

    public java.lang.String getHeader()

### setHidden

    public void setHidden(boolean hidden)

  True to hide the column. Defaults to false.

  Parameters:
    `hidden` - true to hide column

### getHidden

    public boolean getHidden()

### setFixed

    public void setFixed(boolean fixed)

  True to make the column width fixed.

  Parameters:
    `fixed` - true for fixed width

### getFixed

    public boolean getFixed()

### setRenderer

    public void setRenderer(Renderer renderer)

  Sets the rendering (formatting) function for a column.

  Parameters:
    `renderer` - the column renderer

### setResizable

    public void setResizable(boolean resizable)

  False to disable column resizing. Defaults to true.

  Parameters:
    `resizable` - false to disable column resizing

### getResizable

    public boolean getResizable()

### setRenderer

    public void setRenderer(java.lang.String renderer)

### setSortable

    public void setSortable(boolean sortable)

  True if sorting is to be allowed on this column. Defaults to the value of `ColumnModel.setDefaultSortable(boolean)`. Whether local/remote sorting is used is specified in `Store.Store(com.gwtext.client.data.DataProxy, com.gwtext.client.data.Reader, boolean)`

  Parameters:
    `sortable` - false to disable sorting

### getSortable

    public boolean getSortable()

### setWidth

    public void setWidth(int width)

  The initial width in pixels of the column.

  Parameters:
    `width` - the column width

### getWidth

    public int getWidth()

### setEditor

    public void setEditor(GridEditor editor)

  Sets the editor for a column.

  Parameters:
    `editor` - the column editor

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD