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. Cell types, formats and wrap

Basic editable cells for direct editing in input, textarea or contentEditable div

Source: 03-Types.js
  • Cell Type


    FastGrid supports these cell and tool types:
    • Auto

      - default cell type for normal cells. See Auto type.
      Automatic type chosen according to cell value and Format. It chooses among Bool (as TRUE / FALSE, not checkbox), Number, Date and String / Html types.
    • Bool

      - Boolean cell type as 0 or 1. See Bool type.
      Boolean type with value 0/null/false or 1/true or -1 as unknown. It is displayed as checkbox.
      It supports also values from -999 to 999 as number inside the checkbox.
    • Number

      - Formatted integer or float number. See Number type.
      Integer or floating point number. It is formatted by Format.
    • Date

      - Formatted date and or time. See Date type.
      Date and/or time. It can be set as number of millisecond since 1/1/1970 (if set ExcelDates to count of days since 12/31/1899) or date string "M/d/yyyy h:m:s". It is formatted by Format.
      It can show calendar to pickup the date, date range or date and time. Show the calendard icon by adding Date icon in LeftIcons / RightIcons / TextIcons.
    • String

      - Unformatted plain text with no special settings.
      It cannot contain HTML code - any HTML code is escaped.
    • Html

      - Unformatted html / rich text. See Html type.
      It permits font and text color attributes and links for individual text parts.
    For more information see Cell Type.
  • Format


    Formatted can be types Auto, Number and Format.
    The format is specified by

    Format

    attribute string. The Format string has similar format like MS Excel or C# date and number formats.
    In Auto type the date Format can be chosen automatically according to the entered value.
    Different format for editing types Number and Date can be specified by

    EditFormat

    attribute.
    For more information see Number format and Date format.
  • Empty value


    The empty cell can display string defined

    EmptyString

    or formatted string defined by

    EmptyValue

    .
  • Multiline text - wrapping


    The wrapping long text can be permitted for any cell Type by setting

    Wrap

    attribute (bits).
    To permit wrapping on CR/LF or <br> tag add value 4 to the Wrap.
    Wrap&3 controls automatice wrapping (1 - wraps on spaces, 2 - wraps on spaces if possible otherwise wraps words, 3 - wraps on words).
    For more information see Wrap attribute.
  • HTML


    HTML code can be placed in Html type, in Auto type if set Cfg

    AutoHtml

    , in Format attribute if set Cfg

    HtmlFormat

    .
    Permitted HTML tags: <span>, <b> / <strong> (font-weight:bold), <i> / <em> (font-style:italic), <u> / <ins> (text-decoration:underline), <s> / <strike> / <del> (text-decoration:line-through), <small> (font-size:10px), <code> (font-family:monospace), <br>, <a>.
    Permitted CSS attributes: font-weight, font-style, font-variant, text-decoration, font-size, font-family, color, text-shadow.
    After editing all the HTML tags (except <a> and <br>) are converted to <span> tag with appropriate CSS attributes.
    To use cell with HTML code to calculate column width set Cfg

    HtmlWidth

    , to control row height set Cfg

    HtmlHeight

    .
    The HTML code can contain custom JavaScript events like onclick, to permit them set Cfg

    HtmlEvents

    .
    For more information see Html Type.