There are a few events which you will find specific to the grid object only.
Remember, an event is like a trigger, usually initiated by the user. When it goes off, Method will do the actions associated to the event.
The load event is not specific to grids. It will trigger when the screen first loads, for example, when you navigate to the screen for the first time. This event happens before the data loads into the grid.
Row Click Event
The row click event is specific to grids. It triggers when a Method user clicks on a row in the grid.
This is often used with the Go To Screen action to send the user to a screen to edit the record which has been clicked.
Within the action set, references to the field in the grid will return values of the row clicked.
In the above animation, the grid is called ContactsGrid. The row clicked is a record pertaining to Bob Crenshaw. Any time you pull in a value from the grid's fields, it will be from Bob's particular record.
Below is the action Go To Screen which is the action for the row click event.
Note you can set the active record ID, and the dropdown gives a number of controls to pull the value from.
The highlighted ContactsGrid values pertains to fields available in the grid, and the value each field contains is from the record which was clicked in the row.
Thus, when this is set to ContactsGrid-Record ID:
we are setting active record ID to the record ID of the row which was clicked, which is Bob Crenshaw's record ID.
Column Action Click Event
When defining columns in a grid, you have the option to give actions for when a Method user clicks in a particular column and a particular row.
In the below example, I have set up a few Link columns, and when they are clicked on, they display messages:
To access a column click event, you will need to go into the Columns of the grid itself, and select a column you want to add the actions to.
In the above animation, a grid is based on a small table holding types of pets. Below is the columns view of this grid:
In the above image, the third column is selected which shows the eye to symbolize a view column.
The arrow is point to the columns click event, and it currently has one action associated to it as indicated by the number in the brackets.