RealGrid2 API
Interface
CheckBar

CheckBar

Settings related to the checkbar Model

Signature:

export interface CheckBar 

Remarks

While holding down shift in the checkbar area, move to the previous row or row. When you click on the next row, you only need to enter the information required to use batch check

GridBase.setCheckBar().

Example

gridView.setCheckBar({exclusive: true });

Events

PropertyTypeDescription
checkableCallbackCheckableCallbackA callback that determines whether a check is possible

Properties

PropertyTypeDescription
cellStyleCallbackRowBarCellStyleCallbackCallbacks to style cells
checkableExpressionstringFormula for check availability
checkableOnlybooleanWhether only checkable rows can be checked
checkLocationColumnHeaderItemLocationSpecifies the location of the checkBox.
displayOrdernumberOrder of appearance among check bars, status bars, and indicators (index)
exclusivebooleanWhether only one row can be checked
fieldNamestringConnect the checked status of checkBar with dataField.
focusMovebooleanWhether to move focus to the clicked row when the checkBox is clicked
footTextstringText to display in foot area
headTextstringText to display in head area
headThreeStatesboolean
itemGapnumberSpecifies the spacing between checkBox and headText.
mergeRulestringCheckBox merge rule
popupMenuPopupMenuItem[] | stringpop-up menu
showAllbooleanWhether to display “v” in check bar head
showFocusbooleanWhether or not to apply the style to the cell corresponding to the focused row
showGroupbooleanWhether to display a checkbox in the group header area when grouping rows
showGroupFooterbooleanWhether to display a checkbox in the group footer area when grouping rows
showSelectionbooleanWhether to apply styles to related cells according to the data selection area
sumTextstringText to display in summary area
syncHeadCheckbooleanCheck status of all items in the data area and whether the head of the check bar is linked
threeStatesbooleanWhether to display some selections when only some are checked
toggleRadiobooleanWhen exclusive is true, the radio's check state is switched.
useImagesbooleanDisplays the check of checkBar using an image.
visiblebooleanVisibility
visibleOnlybooleanWhether to check only visible rows when selecting all by checking the check bar head
widthnumberwidth

Events Desc

checkableCallback

A callback that determines whether a check is possible.

Type - CheckableCallback

Remarks:

Checking is not possible when false is returned.

Example:

const f = function(dataSource, item) {
 if (item.value) {
 return item.value !== 'doNotCheck';
 }
 else {
 return false;
 }
}
 
gridView.setCheckBar({checkableCallback: f});

Properties Desc

cellStyleCallback

Callbacks to style cells

Type - RowBarCellStyleCallback


checkableExpression

Formula for check availability

Type - string


checkableOnly

Whether only checkable rows can be checked

Type - boolean

Remarks:

You can specify whether checkability is possible in checkableExpression.


checkLocation

Specifies the location of the checkBox.

Type - ColumnHeaderItemLocation

Remarks:

Specifies the position of the checkBox when the headText is displayed. You must change the width or height of checkBar GridHeader.height appropriately.


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.


exclusive

Whether only one row can be checked

Type - boolean


fieldName

Connect the checked status of checkBar with dataField.

Type - string


focusMove

Whether to move focus to the clicked row when the checkBox is clicked

Type - boolean


footText

Text to display in the foot area

Type - string


headText

Text to display in head area

Type - string


headThreeStates

Whether to display some selections in the checkbox in the head area when only some are checked

Type - boolean


itemGap

Specifies the spacing between checkBox and headText.

Type - number


mergeRule

CheckBox Merge Rules

Type - string

Remarks:

The CheckBoxes of rows with the same value in the specified field are displayed together.

Example:

gridView.checkBar.mergeRule = "values['fieldName']";
gridView.checkBar.mergeRule = "values['field1'] + values['field2']";

popupMenu

pop-up menu

Type - PopupMenuItem[] | string


showAll

Whether to display “v” in the check bar head

Type - boolean

Remarks:

When checking after displaying, check all


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 'rg-checkbar-focus' style.


showGroup

Whether to display a checkbox in the group header area when rows are grouped

Type - boolean


showGroupFooter

Whether to display a checkbox in the group footer area when rows are grouped

Type - boolean

Remarks:

If CheckBar.showGroup is false, it will not be displayed even if the value is true.


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-checkbar-select' style according to the data selection area.


sumText

Text to display in summary area

Type - string


syncHeadCheck

Check status of all items in the data area and whether the head of the check bar is linked

Type - boolean

Remarks:

When all items in a data row are checked, they are automatically checked in the Head area.


toggleRadio

When exclusive is true, the radio's check state is switched.

Type - boolean


useImages

Displays the check of checkBar using an image.

Type - boolean


visible

Visibility

Type - boolean


visibleOnly

Whether to check only visible rows when selecting all by checking the check bar head

Type - boolean


width

width

Type - number