ComponentOne DataObjects for .NET
CurrentRowChanged Event (BaseDataSourceComponent)

C1.Data.2 Assembly > C1.Data Namespace > BaseDataSourceComponent Class : CurrentRowChanged Event
Fired when there are changes in the current row, whatever their cause, resulting from field change, current row change or complete data refresh.
Syntax
'Declaration
 
Public Event CurrentRowChanged As CurrentRowChangedEventHandler
public event CurrentRowChangedEventHandler CurrentRowChanged
Event Data

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

PropertyDescription
Indicates a type of change occurred.  
Returns the CurrencyManager object that manages this rowset.  
For C1DataSet rowsets, that is, when a C1DataSet component is specified as the DataSource value for a bound control, this property returns the DataMember value used to bind to this rowset. In other cases, the value is empty string.  
Position of Row in the list.  
Row that became current, or null if there is no current row (empty rowset).  
Name the of table on which the rowset is based.  
Name of the table view on which the rowset is based. In C1DataView, if the rowset represents rows directly from a table, that is, when TableName property is used to define the rowset source, this property value is empty string.  
Remarks
The CurrentRowChanged event is useful in scenarios like synchronizing detail data with the master row on every change occurring in the master row. The CurrentRowChanged event is triggered in two main cases:

1. When row currency changes, another row becomes current, or the whole rowset is refreshed. In this case, event argument property ChangeType is set to RowChangedTypeEnum.CurrentRowChanged.

2. When the value of a field (or several fields) in the current row is changed. In this case, event argument property ChangeType is set to RowChangedTypeEnum.FieldsChanged.
See Also