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

3. Columns

FastGrid columns and column parts

  • ColParts


    The column parts and their order are defined in ColParts array. Default ColParts definition is in Defaults.js:
    ColParts: [
    { id:"LeftScroll",Type:"Scroll", Item:"$ItemLeftScroll", Hidden:1 }, //. Left vertical scrollbar, hidden by default
    { id:"LeftCols", Type:"Cols", Rel:100000, MinWidth:70, MinWidthResize:0, ExportFixed:1 }, //. Left columns
    { id:"Cols", Type:"Cols", Rel:2, MinWidth:70, MaxAuto:475254, AcceptImages:1 }, //. Middle columns
    { id:"RightCols",Type:"Cols", Rel:100000, MinWidth:70, MinWidthResize:0 }, //. Right columns
    { id:"RightScroll",Type:"Scroll", Item:"$ItemRightScroll" } //. Right vertical scrollbar
    ],
    It is possible to move, add or delete only some column parts in other ColParts definition, e.g. ColParts: [ { id:"RightScroll", Next:"RightCols" } ]
    Or it is possible to redefine all row parts by adding first item in ColParts as { Clear:1 }
  • Columns


    • The columns are defined only for table rows. The toolbar rows have defined their cells in Cells array instead of columns.
    • The columns define column and cell attributes for whole columns. The cell values and attributes are usually defined in rows, although it is possible also in columns, in arrays V, U, A and B.
    • The columns contain cells in rows. Cells can be spanned in both directions, similarly to HTML <TABLE> tag.
    • The columns can be scrolled in both directions, vertically and horizontally. Although in some sections like LeftCols or RightCols the columns are usually fixed, not scrolled horizontally.
    • The columns can be nested in tree, sorted, filtered, grouped, added, deleted, moved (dragged), in the same way as table rows.
    • The columns are defined in in ColPart Type = "Cols", by default in LeftCols, RightCols and Cols parts.
    • The columns can contain data without special meaning and there are also predefined some feature columns:
      • Header

        column defined by D: "Header". Shows row captions (ids). Provides row resizing and moving. Controls sorting settings.
        Header column has cells like any data column, it is possible to define Type, Format and other cell attributes.
        The Header cells are not editable, but can be changed from popup list like List. The default cell Type for Header column is Text, new line can be added by '&#x0a;' or can be retyped to Html and used <br>.
      • Index

        column defined by D: "Index". The same as Header, but shows row indexes instead of captions.
      • Filter

        column defined by D: "Filter". Controls filter settings.
      • Panel

        column defined by D: "Panel". It usually shows control icons in LeftIcons to manipulate rows.
      The feature columns have set Important attribute, so their cell attributes are prefered to the attributes set in rows.
      The normal columns have not set Important by default, so cell attributes set in row are prefered to cell attributes set in columns.