RealGrid2 API
Interface
StateBar

StateBar

A configuration model that involves a status bar that displays the status of rows.

When using GridBase.setStateBar(), you only need to enter the necessary information.

Signature:

export interface StateBar

Example

gridView.setStateBar({errorVisible: true});

Properties

PropertyTypeDescription
cellStyleCallbackRowBarCellStyleCallbackCallbacks to style cells
displayOrdernumberOrder of appearance among check bars, status bars, and indicators (index)
errorVisiblebooleanWhether to apply the style corresponding to the error to the status bar when an error occurs
footTextstringText to display in foot area
headTextstringText to display in head area
markStateMarkType of status displayed on the status bar
popupMenuPopupMenuItem[] | stringpop-up menu
showFocusbooleanWhether or not to apply the style to the cell corresponding to the focused row
showSelectionbooleanWhether to apply styles to related cells according to the data selection area
stateTextsStateTextsStatus texts to be displayed in status bar
sumTextstringText to display in summary area
visiblebooleanVisibility
widthnumberwidth

Properties Desc

cellStyleCallback

Callbacks to style cells

Type - RowBarCellStyleCallback


displayOrder

Order of appearance among check bars, status bars, and indicators (index)

Type - number

Remarks:

The smaller the number, the more left it is placed.


errorVisible

Whether to apply the style corresponding to the error to the status bar when an error occurs.

Type - boolean


footText

Text to display in the foot area

Type - string


headText

Text to display in head area

Type - string


mark

Type of status displayed in the status bar

Type - StateMark


popupMenu

pop-up menu

Type - PopupMenuItem[] | string


showFocus

Whether to apply the style to the cell corresponding to the focused row

Type - boolean

Remarks:

If true, the cell corresponding to the focused row is displayed in the 'rg-statebar-focus' style.


showSelection

Whether to apply styles to related cells according to the data selection area

Type - boolean

Remarks:

If true, related cells are displayed in 'rg-statebar-select' style according to the data selection area.


stateTexts

Status texts to be displayed in the status bar

Type - StateTexts

Remarks:

[Default values see RowState)]

'C': stateTexts[RowState.CREATED] 'U': stateTexts[RowState.UPDATED] 'D': stateTexts[RowState.DELETED] 'X': stateTexts[RowState.CREATE_AND_DELETED]

Example:

gridView.setStateBar({
    stateTexts :{
        "created": "new",
        "updated": "edited",
        "deleted": "Delete",
        "createAndDeleted": "Delete"
    }
})

sumText

Text to display in summary area

Type - string


visible

Visibility

Type - boolean


width

width

Type - number