TreeGrid's built-in options

TreeGrid's built-in options

Postby linb » Fri May 31, 2013 6:30 am

1.Column/Header options in setHeader / updateHeader

    id : String, column's unique id
    width : Integer, column's width
    relWidth : Boolean, column's width is automatically computed to fill all the remaining space, or not
    minWidth : Integer, column's min width
    maxWidth : Integer, column's max width
    caption : String, column's caption
    colResizer : Boolean, column is resizale or not
    headerStyle : String, column node's CSS style
    headerClass : String, column node's CSS calssname
    colRenderer : Function(profile,col), renderer for col
    hidden : Boolean, column is hidden, or not
    sortby : Function(x,y){return -1:0:1;}, custom sortby function

2. Row options in setRows / updateRow

    id : String, row's unique id
    height : Integer, row's height
    caption : String, row's caption
    rowStyle : String, row node's CSS style
    rowClass : String, row node's CSS classname
    firstCellStyle : String, CSS style for the first cell of the row
    firstCellClass : String, CSS classname for the first cell of the row
    group : Boolean, it's a group row, or not
    cells : Array, row's cells data
    sub : Array or [true], sub rows data
    preview : String, preview contents
    summary : String, summary contents
    rowResizer : Boolean, the row is resizable or not
    rowRenderer : Function(profile,row), renderer for row
    hidden : Boolean, row is hidden, or not

3. Cell options that can be set in cell's object only

    id : String, cell's unique id
    caption : String, cell's caption
    value : Object, cell's value
    tag : String, cell's string tag var
    tagVar : Key/Value pairs, cell's object tag var

4. Cell options that can be set in cell/row/grid.rowOptons/col/grid.colOptions/grid.properties

The priority is : cell > row > grid.rowOptons > col > grid.colOptions > grid.properties.

    type : String, in 'number', 'spin', 'currency', 'progress', 'input', 'textarea', 'date', 'datetime', 'listbox', 'combobox', 'helpinput', 'time', 'color', 'getter',
    'popbox', 'cmdbox', 'file'
    cellStyle : String, CSS style for the cell
    cellClass : String, CSS classname for the cell
    disabled : Boolean, it's disabled or not
    readonly : Boolean, it's readonly or not
    editable : Boolean, it's editable or not
    renderer/cellRenderer : Function(profile,cell), renderer for cell's caption.
    precision : Integer, for number/spin/currency type cell only
    increment : Number, for number/spin/currency type cell only
    min : Number, for number/spin/currency type cell only
    max : Number, for number/spin/currency type cell only
    maxlength : Number, for input/combobox/helpinput[string] type cell only
    groupingSeparator: String, for number/spin/currency type cell only
    decimalSeparator: String, for number/spin/currency type cell only
    forceFillZero: Boolean, for number/spin/currency type cell only
    numberTpl : String, for number/spintype cell only
    currencyTpl : String, for currency type cell only
    dateEditorTpl: String, for date type cell only
For Cell's editor:

    editorReadonly : Boolean, readonly property for build-in editor
    editorEvents : Key/Value pairs, events for build-in editor
    editorFormat : Function(beforeFormatCheck event in ComboInput control) or String, editorFormat property for build-in editor, input type only
    editorMask : String, mask property for build-in editor, input type only
    editorListKey : String, listKey property for build-in editor, combobox/listbox type only
    editorListItems : Array, listItems property for build-in editor, combobox/listbox type only
    editorDropListWidth : Integer, width for build-in combinput editor, combobox/listbox type only
    editorDropListHeight : Integer, height for build-in combinput editor, combobox/listbox type only
    dateEditorTpl : String, dateEditorTpl property for build-in editor, date type only
    editorProperties : Key/Value pairs, widget properties for build-in editor, properties object
    editorCacheKey: String, to determine the editor will be cached or won't (be destroyed after editing)
    customEditor:{
      // to Init the Editor
      iniEditor: Function(profile/*grid UIProfile*/, cell/*Object*/, cellNode/*Dom Node*/)
      // to active the editor
      activate : Function()
      // to undo the editor
      undo: Function()
    }
linb
Site Admin
 
Posts: 102
Joined: Thu Apr 25, 2013 6:51 am

Return to Cookbook

Who is online

Users browsing this forum: No registered users and 1 guest

cron