Skip to main content

getSubRow()

returns the configuration and content of a sub-row for the specified row

info

Note that the method works if a sub-row is in the visible area or if the preserve:true property is specified in the subRowConfig object of the sub-row.

getSubRow(id: string | number): ISubViewCell | null;

Parameters:

  • id: string | number - the id of a row

Returns:

An object that includes the following properties:

css(string) user-defined CSS classes for a sub-row
element(HTMLElement | null) the parent container of the current sub-row
expanded(boolean) defines whether a sub-row is expanded by default, false by default
fullWidth(boolean) defines whether a sub-row will take all the width of Grid, false by default
height(number) the height of a sub-row in pixels, 200 by default
padding(string | number) the inner padding of a sub-row, 8 by default
preserve(boolean) saves the state of sub-rows while expanding/collapsing, disappearing from the visible area, data updating, false by default
toggleIcon(boolean) enables the icon for expanding/collapsing, true by default
view(string | object | null) that can be presented by:
  • a string, if the sub-row is set by the HTML content
  • an object instance to interact with, if a sub-row is an instance of a nested component (for example, Grid)
  • null, if the sub-row is unavailable (for example, it is hidden or placed outside the visible area and the preserve config is not specified)

Related article: Getting sub-row config and content

Change log:

  • Added in v9.1