Docs
API
  • order

    Order column type

    Order column. It does numbered rows.

    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'
    },{
    ...
    

    draggable

    Boolean

    Allows column to be dragged.

    
    draggable: true,
    
    false

    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
    }