Docs
API
  • expand

    Enables row expanding element for column.

    Example

    
    columns: [{
    ...
    },{
      type: 'order',
      locked: true
    },{
    ...
    

    align

    String

    Column header cell align.

    
    ...
    columns: [{
      type: 'order',
      title: 'N',
      align: 'right'
    },{
    ...
    
    left

    cellAlign

    String

    Column cell align.

    
    ...
    columns: [{
      type: 'image',
      title: 'Photo',
      index: 'src',
      width: 80,
      cellAlign: 'center'
    },{
    ...
    
    right

    cls

    String

    Column css className.

    
    .my-order {
      background-color: #ccc;
    }
    ...
    columns: [{
      type: 'order',
      cls: 'my-order'
    },{
    ...
    

    columnMenu

    Boolean

    Enable/disable column for menu.

    
    columns: [{
      title: 'Company',
      index: 'name',
      columnMenu: false,
      type: 'string',
      width: 200,
    }, {
      text: 'Stock Price',
      columns: [{
        title: 'Price',
        index: 'price'
      }, {
        title: 'Change',
        index: 'change',
        render: renderChangesFn
      }, {
        title: '% Change',
        index: 'pctChange',
        render: renderChangesFn
      }]
    }, {
      title: 'Last Updated',
      index: 'lastChange',
      type: 'string',
      width: 97
    }]
    ...
    
    undefined

    draggable

    Boolean

    Allows column to be dragged.

    
    draggable: true,
    
    false

    headerCls

    String

    It is used only for checkbox column type.
    Configure as true to display a checkbox below the header text.
    Clicking the checkbox will check/uncheck all records.

    
    {
      index: 'company',
      type: 'string',
      title: 'Company',
      headerCls: 'header-cell-company'
    }
    
    undefined

    hidden

    Boolean

    Hide column on start.

    
    {
      index: 'married',
      resizable: true,
      type: 'checkbox',
      title: 'Married',
      width: 100,
      hidden: true
    }
    
    false

    lockable

    Boolean

    Enable/disable column locking.

    
    locked: false,
    
    true

    locked

    Boolean

    Locking column.

    
    {
      type: 'order',
      width: 65,
      locked: true
    }
    
    False

    maxWidth

    Number

    The maximum width of column.

    
    maxWidth: 150,
    

    menu

    Mixed

    Enables column menu.

    
    menu: true,
    

    Example: Custom Default menu

    
    menu: ['sort', '-', 'columns', '-', 'lock'],
    

    Example: Custom menu

    
    menu: ['columns', '-', {
      text: 'Hi',
      handler: function(){
    	alert('Hi');
      }
    }],
    

    Example: One menu with columns only

    
    menu: 'columns',
    
    false

    minWidth

    Number

    The minimum width of column.

    
    minWidth: 80,
    

    render

    Function

    Column render function.

    Before grid cell will be updated with it's value, function render runs if it exist. Function render is mainly used for some not standard styling or formatting of cell value..

    
    render: function(o){
      if(o.value < 0){
        o.style = {
          color: '#E46B67'
        };
      }
      else{
        o.style = {
          color: '#65AE6E'
        };
      }
    
      o.value = o.value + '%';
    
      return o;
    }
    

    resizable

    Boolean

    Enable resizing of column.

    
    resizable: true,
    
    False

    rightLocked

    Boolean

    Locking column to right side.

    
    {
      type: 'order',
      width: 65,
      rightLocked: true
    }
    
    False

    title

    String

    Column title.

    
    {
      type: 'order',
      title: 'N'
    }
    
    ''

    titleEditable

    String

    Enables column title editing by double click on text.

    
    {
      type: 'string',
      width: 65,
      title: 'Name',
      titleEditable: true,
      index: 'name'
    }
    
    false

    type

    String

    Column type.

    
    {
      type: 'type'
    }
    

    width

    Number

    column width.

    
    {
      type: 'order',
      width: 65
    }