ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.OnAddNew Event

Occurs whenever an AddNew operation has been initiated.

[Visual Basic]

Public Event OnAddNew As EventHandler

[C#]

public event EventHandler OnAddNew

[Delphi]

public property OnAddNew: EventHandler read remove_OnAddNew write add_OnAddNew;

Remarks

The OnAddNew event occurs when an AddNew operation has been initiated by either of the following:

·      The user modifies a cell within the AddNew row. Typically, this occurs as soon as the user types a character, but may also occur as a result of a built-in radio button or combo box selection.

·      The ValueItem.Value or C1DataColumn.Text property of a column is set in code when the current cell is within the AddNew row.

This event is raised only if the grid's AllowAddNew property is True.

When the OnAddNew event is raised, the value of the AddNewMode property is AddNewPending.

Example

For an example using the OnAddNew event, see Setting Default Values for New Rows.

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.