Row Selection of Dynamically Loaded Rows
To expand and select rows in a Tree Grid that are not loaded on the client yet, provide an infotable with at least an id column indicated by the IDFieldName property that contains the fully-qualified path of row IDs to the selected row. By default, the :; character combination is used as the path separator, but you can change it by setting the IDPathSeparator property in Mashup Builder or in the JSON configuration file.
For example to select a row with ID ddd, create an infotable with a column with ID value:
//aaa:;bbb:;ccc:;ddd.
If you want the Tree Grid to generate an output selected rows infotable with fully-qualified ID paths, set the IncludeRowExpansionParents property to true, otherwise it only uses the single leaf ID. When the infotable for the selected rows is sent to the grid and a listed row is not yet loaded by the grid, the Tree Grid automatically generates a request to the bound data service. If the IncludeRowExpansionParents property is set, the following parameters are included:
{id: 'aaa', leafId: 'ddd', maxLevels: 25}
The grid is requesting all rows from ID aaa to its leaf node ddd to fully create the expanded path to the row with ID ddd.
In JSON configuration, add the following:
"treeSettings":
{ // Required for Tree Grid.
“IncludeRowExpansionParents”:true, //{boolean} Fetch parent rows of expanded or selected rows that are not pre-loaded.
"IDPathSeparator": ':;' // {string} The ID path separator that is used in ID paths for the selection of non-loaded rows.
}
For more information about the settings, see the RowSelection example in the GridAdvancedExampleEntities-V4.0.xml. In this example, we are binding an infotable with full path row selections to the right tree grid from the left grid. Therefore, the left grid needs to generate a selected row infotable with fully-qualified paths and not just the leaf ID. To do this, you must set the IncludeRowExpansionParents property. Or, you can create a service that generates an infotable with fully-qualified paths to the rows you want to select. The path separator character is configurable by the IDPathSeparator property. By default, :; is used but you can change it. In the row selection example, you must change the setting in both tree grids to match.