RealGrid2 API
Interface
TreeOptions

TreeOptions

Setting model for TreeView display

Signature:

export interface TreeOptions

Remarks

When setting it as an option in TreeView, you only need to enter the necessary information.

Example

tree.setTreeOptions({lineVisible: false});

Properties

PropertyTypeDescription
collapsedIconnumberIcon displayed when a tree item is collapsed
collapseWhenCtrlKeybooleanWhether to fold when the ctrl key and left arrow key are pressed together
collapseWhenLeftKeybooleanWhether to fold when only the left arrow key is pressed
defaultIconnumberIf the icon index of an item does not exist or exceeds the total number, the designated icon index
expandedIconnumberIcon displayed when tree item is expanded
expanderIconStyleTreeExpanderIconStyleSpecifies the shape of the Tree Expander icon
expandWhenCtrlKeybooleanWhether to expand when pressing the ctrl key and the right arrow key together
expandWhenRightKeybooleanWhether to expand when the right arrow key is pressed
expandWhenSetDataExpandWhenSetDataYou can set whether to keep the existing expansion after set data.
iconImagesstring[]List of image files to use as icons
iconImagesRootstringPath to image to use as icon
iconVisiblebooleantree icon visible
lineVisiblebooleanTree line visibility
recursiveDeletingbooleanIf the parent node is removed in softDeleting state, the state value of the child node changes to RowState.DELETED.
showCheckBoxbooleanCheckbox inside tree
templateOptionsTreeTemplateOptions | undefinedUsed when displaying an HTML tag in the first column of treeView.

Properties Desc

collapsedIcon

Icon displayed when a tree item is collapsed

Type - number


collapseWhenCtrlKey

Whether to fold when pressing the ctrl key and left arrow key together

Type - boolean

Remarks:

This works even if collapseWhenLeftKey is false.


collapseWhenLeftKey

Whether to fold when only the left arrow key is pressed

Type - boolean

Remarks:

It should be located on the far left.


defaultIcon

Icon index designated when the icon index of an item does not exist or exceeds the total number.

Type - number


expandedIcon

Icon displayed when a tree item is expanded

Type - number


expanderIconStyle

Specifies the shape of the Tree Expander icon

Type - TreeExpanderIconStyle


expandWhenCtrlKey

Whether to expand when pressing the ctrl key and the right arrow key together

Type - boolean

Remarks:

This works even if expandWhenRightKey is false.


expandWhenRightKey

Whether to expand when the right arrow key is pressed

Type - boolean

Remarks:

It should be located on the far right.


expandWhenSetData

Set whether to keep the existing expansion after setting data.

Type - ExpandWhenSetData

Remarks:

Applies only when setting data with LocalTreeDataProvider.setRows() or LocalTreeDataProvider.setCsvRows().


iconImages

List of image files to use as icons

Type - string[]


iconImagesRoot

Path to the image to use as the icon

Type - string


iconVisible

tree icon visible

Type - boolean


lineVisible

Whether to display tree lines

Type - boolean


recursiveDeleting

If the parent node is removed in softDeleting state, the state value of the child node changes to RowState.DELETED.

Type - boolean


showCheckBox

Checkbox inside tree

Type - boolean


templateOptions

Used when displaying html tags in the first column of treeView.

Type - TreeTemplateOptions | undefined