RealGrid2 API
Interface
ClickData

ClickData

Information model of the clicked item

Signature:

export interface ClickData

Remarks

This is the information model for items used in click-related callbacks such as GridBase.onMenuItemClicked or GridBase.onCellClicked.

Example

gridView.onMenuItemClicked = function (grid, item, clickData) {
      console.log(item.label + "was clicked.");
      console.log("cellType is: " + clickData.cellType);
};

Properties

PropertyTypeDescription
cellTypeGridCellTypeType of cell clicked
columnstringColumn of clicked cell
dataRownumberIf the clicked cell is a DataCell, dataRow
farbooleanWhether the scroll button is up, down, or left and right
fieldnumberField of clicked target
fieldNamestringField name of clicked target
groupLevelnumberGroup level of clicked cell
indexnumberIndex of clicked cell
itemIndexnumberThe order in which the clicked object is located
subTypeGridCellTypeSubtype of clicked object
targetHTMLElementWhen clicking on the HtmlElement of TemplateCellRenderer target
typestringIf the cell is a DataCell and the clicked element is an item of the renderer, the type of the renderer
urlstringWhen clicking A Tag of linkCellRenderer, url
valueanyData value when the type of the clicked cell is data
verticalbooleanWhether the scrollbar is vertical

Properties Desc

cellType

Type of cell clicked

Type - GridCellType


column

Column of the clicked cell

Type - string


dataRow

dataRow if the clicked cell is a DataCell

Type - number


far

Whether the scroll button is up/down or left/right

Type - boolean

Remarks:

If it is a right or bottom button, true


field

Field of clicked target

Type - number


fieldName

Field name of clicked target

Type - string


groupLevel

Group level of clicked cell

Type - number


index

Index of the clicked cell

Type - number

Remarks:

Indexes for footer, summary, etc.


itemIndex

The order in which the clicked object is located

Type - number


subType

Subtype of clicked object

Type - GridCellType


target

When clicking on the HtmlElement of TemplateCellRenderer target

Type - HTMLElement


type

If the cell is a DataCell and the element clicked is an item of the renderer, the type of the renderer

Type - string


url

URL when clicking A Tag of linkCellRenderer

Type - string


value

Data value when the type of the clicked cell is data

Type - any


vertical

Whether the scrollbar is vertical

Type - boolean

Remarks:

If it is a vertical scrollbar, true