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

5. Loading child rows on demand

Loading child rows on parent expand

  • A row can download its child rows on its expand when it has set attribute

    Children

    . It can be set to count of loaded children or simply to 1.
    If the row has some children already, the loaded children are added to them on the end.
    Note the Children attribute is applied only for Collapsed rows.
    If the row contains deep tree, the children with their children, set attribute

    ChildrenL

    of the parent row to the tree deepness.
  • The rows are loaded from url set by Cfg attribute

    ChildrenUrl

    . Or every row can have set its

    ChildrenUrl

    .
    The ChildrenUrl is standard FastGrid Source object or string with server url.
    The server url can contain keyword *Row to be replaced by the parent row that downloads its children.
  • The data with the loading children rows is standard FastGrid JSON object with Body or ChangedRows.
    The rows should contain

    Parent

    attribute to be placed to the correct parent row.
    If the loaded data contains row in tree, the rows should not contain L attribute, but rather the Parent to be included to the given parent row.
  • The row children are loaded only on its first expand. After the expand the Children attribute is cleared.
    To load children on every expand, set Cfg attribute

    ChildrenReload

    .
  • To restrict loading all children on expand all set Cfg

    ChildrenExpandAll

    = 0. It will expand and load only the first collapsed level.
    To expand all children on print / export with collapsed rows set Cfg attribute

    PrintLoadChildren

    /

    ExportLoadChildren

    .