Version 1
Common Interface IDataManagerGroup GrapeCity DataViewsJS Interface

IDataManagerGroup Interface

Defines data manager group.

Heirarchy

Properties

collapsed

collapsed: boolean

The collapse status of this data scope

expandedItemCount

expandedItemCount: number

The number of expanded items in this group.

groupDescriptor

groupDescriptor: IGroupDescriptor

The group descriptor which generates this group.

groups

An array of child groups.

isBottomLevel

isBottomLevel: boolean

Indicates whether this group is a bottom group.

isHierarchical

isHierarchical: boolean

Indicates whether this group is a hierarchical group that contains tree nodes.

itemCount

itemCount: number

The number of items in this group.

level

level: number

The level of this group.

name

name: any

The name of this group.

nodes

An array of IDataManagerNode that contains all the tree nodes in this group.

parent

The parent group.

path

path: number[]

An array of indexes that indicate the path from the root scope to the current scope

rootNode

The root tree node of this group.

type

Returns scope type ('group' or 'node')

Methods

evaluate

  • evaluate(formula: string): any
  • Evaluates the formula with the current data context

    Parameters

    • formula: string

      The formula to be evaluated

    Returns any

    The evaluated result

findChildGroupByPath

  • Gets the child group from the relative path of this group.

    Parameters

    • path: number[]

      A array of number which indicate relative path of the child group.

    Returns IDataManagerGroup

    The child group.

getCalculatedColumnValues

  • getCalculatedColumnValues(name: string): any[]
  • Gets all values in this group of a specified calculated column.

    Parameters

    • name: string

      The name of the calculated column.

    Returns any[]

    Return array of column values.

getItem

  • getItem(itemIndex: number, getAllInGroup?: boolean, getAllInTree?: boolean): IDataItem
  • Gets the data item in this group at a specified relative index.

    Parameters

    • itemIndex: number

      Relative index for item in this group.

    • Optional getAllInGroup: boolean

      If false, the item in the collapsed group is not counted.

    • Optional getAllInTree: boolean

      If false, the item in the collapsed tree node is not counted.

    Returns IDataItem

    The data item at the specified index.

getItems

  • getItems(): IDataItem[]
  • Gets all items in this group.

    Returns IDataItem[]

    Array of data items.

getSourceRowIndex

  • getSourceRowIndex(itemIndex: number): number
  • Maps the relative view index to the index in the data source.

    Parameters

    • itemIndex: number

      Relative index in this group.

    Returns number

    The index in the data source.