Skip to content

OnRowChanging - cCJGrid

Called before a row change is about to occur

Type: Event
Return Data Type: Boolean

Parameters

Parameter Type Description
iCurrentSelectedRow Integer The 'from' row number, which is the current SelectedRow, -1 if none
iNewRow Integer The 'to' row number, -1 if none

Syntax

Function OnRowChanging Integer iCurrentSelectedRow Integer iNewRow Returns Boolean

Description

OnRowChanging is called before a row change. It is passed the current row (SelectedRow) and the proposed new row number. If you wish to cancel the row change, return True. By default, the event does nothing and returns False, which allows the row change.

OnRowChanging is called before the old row is committed. In other words, changes in the old row still need to be saved or cleared (reset) before the row change is allowed. Therefore, a row change may still be cancelled, even if you return False from OnRowChanging.

If you need a row changing event that occurs after the row change has actually occurred, use OnRowChanged.

Either the old or new row can be -1, which indicates that the row change was made from or to a non-row.

Return Value

Returns True if the row change should be cancelled.