ComponentOne DataObjects for .NET
BeforeBeginEdit Event (BaseLogic)

C1.Data.2 Assembly > C1.Data Namespace > BaseLogic Class : BeforeBeginEdit Event
Fired when the user starts editing a row, before the row enters edit mode.
Syntax
'Declaration
 
Public Event BeforeBeginEdit As RowChangeEventHandler
public event RowChangeEventHandler BeforeBeginEdit
Event Data

The event handler receives an argument of type RowChangeEventArgs containing data related to this event. The following RowChangeEventArgs properties provide information specific to this event.

PropertyDescription
The action that has occurred.  
The table object where the event has occurred.  
For a deleted row, in BaseLogic.AfterDelete event, the array of field values in the row before the row was deleted. This property is not set in events other than AfterDelete. This property must be used in BaseLogic.AfterDelete event to access row values because they are not accessible through regular row properties after the row has been deleted.  
For events BaseLogic.BeforeEndEdit, AfterEndEdit, this property indicates whether the row has been modified while it was in edit mode. This property is often needed in BaseLogic.BeforeEndEdit/ AfterEndEdit because data-bound controls begin edit mode when they position on a row and end edit mode when they leave the row, even if no changes have been made to the row in the process.  
Parent row.  
The row where the event has occurred.  
Remarks
Throwing an exception in this event prevents the row going into edit mode.

Writing code handling edit mode events, take into account that in addition to explicit programmatic calls to C1DataRow.BeginEdit%M:C1.Data.C1DataRow.EndEdit, edit mode is also used by data bound controlsM:C1.Data.C1DataRow.BeginEdit% is called implicitly). For example, throwing an exception in BeforeBeginEdit event will prevent bound controls from positioning on a row. This also means that BeforeBeginEdit event does not indicate an attempt to change a row. If you need to execute some code when a row is being changed, consider using BeforeFirstChange%E:C1.Data.BaseLogic.AfterFirstChange% events instead.

See Also