FlexGrid for WinForms | ComponentOne
C1.Win.C1FlexGrid.Classic Namespace / C1FlexGridClassic Class / BeforeAddRow Event

In This Topic
    BeforeAddRow Event (C1FlexGridClassic)
    In This Topic
    Fires before a new row is added by the user.
    Syntax
    'Declaration
     
    
    Public Event BeforeAddRow As RowColEventHandler
    public event RowColEventHandler BeforeAddRow
    Event Data

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

    PropertyDescription
    Gets or sets a value indicating whether the operation should be canceled.  
    Gets the index of the column that caused the event.  
    Gets the index of the row that caused the event.  
    Remarks

    This event only fires when C1.Win.C1FlexGrid.C1FlexGridBase.AllowAddNew is set to true and the user creates a new empty row by moving the cursor into the last row on the grid. It does not fire when a new row is added to the grid programmatically or when a row is added to the grid's data source.

    You can use this event to cancel the creation of new rows by setting the Cancel parameter to true. In this case, the cursor does not move into the new row.

    See Also