News in versions: FastGrid 1.0, TreeGrid 17.0
FastGrid FastSheet ExamplesSamples DocumentationDoc Download Licensing Prices Buy Development
services
References References Contacts
TreeGrid Gantt chart SpreadSheet ExamplesSamples DocumentationDoc Download Licensing Prices Buy Contacts

2. Attributes

Attributes in cells

  • For more information see Cell attributes.
  • A attribute

    - attributes in array

    A

    can be defined in row, default row, column and default column. If defined in column, the values are copied to row on grid start and cannot be later changed in column. The row values are always preferred to column regardless on Important attribute.
    A can be defined in three ways, as first character separated string, as array and as object with column ids. The array definition is the fastest way to process.
    The item in A can be string or number as direct default cell id. Or it can be set to object as the attributes definition.
    Which columns and in which order are set by the array or string definition is set by column attribute

    AIndex

    , by default it is set automatically according to defined columns order.
  • B attribute

    - default cell ids in special UTF8 string

    B

    can be defined in row or default row. It is always string in UTF8Store format. It is very short and fast to process.
    Which columns and in which order are set is controlled by column attribute

    UIndex

    , by default it is set automatically according to defined columns order, but only for columns with

    UCode

    that specifies the type and size of the value.
  • row / column attribute


    The cell attribute can be defined in row, default row, column and default column. It is read from row before column except if the column has set Important attribute set.
  • attributeFormula

    - JavaScript formula
    The

    attributeFormula

    can be defined in cell or default cell. For example Cell1:{ColorFormula:"Value<0?'red':'green'"}
    There is not called OnGetFormula API event for the attribute Formula.
  • Mirror attribute

    - all attributes from another cell

    Mirror

    can be defined only in cell or toolbar cell, but not in any default. It reads value from another cell defined by

    Mirror

    /

    MirrorRow

    /

    MirrorCol

    attributes.
    It is read before row / column attribute value. For attributes the MirrorRow should be of the same kind as the source row (toolbar/normal row)!
  • OnGetAttr API event

    - dynamic attribute value generating
    If defined, OnGetAttr is called on every reading of any cell attribute value, including toolbar attributes.
    Defining OnGetAttr can slow down the paint and scroll!
  • Order

    :

    OnGetAttr

    ,

    attributeFormula

    ,

    A

    ,

    B

    ,

    Mirror

    , row / col

    attribute


    attributeFormula can be defined and are read in this order: cell (in A), default cell (in DefCells).
    A can be defined and are read in this order: row, default row, column, default column. There is ignored Important attribute.
    B can be defined and are read in this order: row, default row.
    Mirror can be defined only in cell (in A or tool). It cannot be defined in default cell.
    attribute can be defined and are read in this order: row, default row, column, default column. If column has Important attribute, it is read before row.
  • Toolbar cell


    Toolbar cell can read only these items in this order:

    OnGetAttr

    ,

    attributeFormula

    , cell

    attribute

    ,

    Mirror

    , row

    attribute

    .