ComponentOne DataObjects for .NET
Customizing Data Logic with Events
DataObjects for .NET Express Edition > C1ExpressTable: Working with Simple and Composite Tables > Customizing Data Logic with Events

The C1ExpressTable component supports a rich set of events allowing you to customize data behavior in code. Following is a brief list of C1ExpressTable events (we omit prefixes Before and After pertaining to most events, retain the prefix only if an event occurs only Before or only After). For a full description of C1ExpressTable events see corresponding reference sections and Business Logic Events.

Event Description
AddNew Fired when a new (empty) row is added.
AfterChanges Fired when all changes initiated by a field change are done and handled in code, see the FieldChange event.
BeginEdit Fired when the user starts editing a row (data-bound controls start editing a row immediately after they position on it, even though no changes have been made yet).
CancelEdit Fired when the user cancels editing a row reverting the changes made to it.
CurrentRowChanged Fired when there are changes in the current row, whatever their cause, resulting from field change, current row change or complete data refresh. The CurrentRowChanged event is useful in scenarios such as synchronizing detail data with the master row on every change occurring in the master row.
Delete Fired when a row is deleted.
EndAddNew Fired when a newly added row becomes a regular row in the rowset. When a row is added, it is added empty; its primary key is unknown. A row with unknown primary key is in special transitory state, it is not a regular rowset row. Only after its primary key is set it becomes a regular (added) row, which is signaled by this event.
EndEdit Fired when the user finishes editing a row (data-bound controls finish editing a row when they leave that row, even if no changes have been made).
Error Fired when an exception (error condition) occurs. Gives the programmer an opportunity to handle exceptions (so normal execution can be resumed), show custom error messages and customize/localize error message texts.
FieldChange Fired when a field value is set. Inside this event, your code can set other fields triggering recursive FieldChange events, DataObjects for .NET Express handles this situation correctly. Only after all changes are done and handled, AfterChanges event is triggered.
Fill BeforeFill and AfterFill events are fired both in C1ExpressTable (for each table) and in C1ExpressConnection (once for all tables attached to it) before and after data is fetched from the database.
FirstChange Fired when a first change is made to the row (a field value changed) after BeginEdit.
GenerateSQL Fired before/after executing an SQL command to fetch data from the database. Can be used to customize the SQL SELECT statement used in that command.
PositionChanged Fired when a new row becomes current. Current row is the row on which the end user is currently positioned (controlled by a CurrencyManager, see the System.Windows.Forms.CurrencyManager class in the .NET Framework documentation for more information).
UpdateError Fired when an error occurs in database update, allowing to resolve the error condition. This event is fired both in C1ExpressTable and C1ExpressConnection components. For details on the database update process and how it can be customized with event code, including reconciling multi-user concurrency conflicts, see Updating the Database in DataObjects for .NET documentation.
UpdateRow Fired when a modified row is committed (updated) to the database. This event is fired in a C1ExpressConnection component. For details on the database update process and how it can be customized with event code, see Updating the Database in DataObjects for .NET documentation.
Update Fired before/after all modified rows are committed (updated) to the database. This event is fired in a C1ExpressConnection component.