ComponentOne ADO.NET DataExtender
In This Topic
    Key Features
    In This Topic

    ADO.NET DataExtender allows you to set up a data model for a Windows Form by means of a single component named C1DataViewSet. Some of the key benefits of ADO.NET DataExtender include:

    A single C1DataViewSet component serves as the binding agent for all tables and relations. Without ADO.NET DataExtender, two components (a BindingSource and a DataAdapter) are required to represent each table or relation.

    C1DataViewSet can represent data from the following types of data sources:

    The C1DataViewSet component represents a rich set of events for custom processing of row navigation and changing occurrences. For the convenience of writing event handlers in design time, all C1DataView events are propagated by the owning C1DataViewSet component. C1DataViewSet event data determines in what specific C1DataView an event has occurred.

    The C1DataViewSet component supports the following events, which are useful for responding to changes in row currency, current row values, and connections:

    Event Description
    ColumnChanged Occurs when a C1ViewColumn value is being retrieved. This event allows process editing actions made on C1ViewColumn objects.
    ColumnChanging Occurs after a value has been changed for the specified C1ViewColumn in a C1ViewRow. This event allows process editing actions made on C1ViewColumn objects.
    CurrentChanged This special event, CurrentChanged, is useful when you need to process current row change independent of the reason for this change in the case that another row becomes current, due to navigation, sorting, filtering, and so on, or due to a change of current row column values.
    PositionChanged C1DataView objects provide data navigation capabilities, so you don't need to retrieve CurrencyManager for managing row navigation. You can use the PositionChanged event to process navigation occurrences (along with Current and Position properties).
    RowChanged Occurs after editing of a C1ViewRow has been completed. This event allows process editing actions made on C1ViewRow objects.
    RowChanging Occurs before editing of C1ViewRow objects. This event allows process editing actions made on C1ViewRow objects.
    ViewListChanged If you need to process changes in view rows that occurred due to changes made by means of a C1DataView and underlying DataTable objects, use the ViewListChanged event.

    Within these event handlers, the following properties can be used to address the current row for the affected C1DataView object:

    Property Description

    Current

    Returns the C1ViewRow of the CurrencyManager that services this C1DataView.

    Position

    Returns the position of the current C1ViewRow in the CurrencyManager that services this C1DataView.

    The Update method of the C1DataViewSet component automatically determines the correct order in which rows should be committed to the server. It also refreshes client row columns with new values generated on the server, including the cases of server-generated auto-increment columns in conjunction with master-detail relationships between tables.

    Without ADO.NET DataExtender, the user must call the Update method of one or more DataAdapters in order to commit changes from a DataSet to the underlying data source. In many circumstances, the order in which DataSet changes are sent to the data source is crucial. For example, if a primary key value for an existing row is updated, and a new row has been added with the new primary key value, the update must be processed before the insertion.

    Composite views (similar to a SQL join) combine multiple DataTables in a single DataTable object. As updates are made to the composite view, they are automatically reflected in the constituent tables, and vise versa.

    Column styles are UI-related attributes that can be assigned to data columns in the C1ViewSetDesignerForm, and then realized at run time when bound to a ComponentOne control. The current set of controls that support column styles includes C1TrueDBGrid, C1FlexGrid, and C1Input.

    You can define, format, or edit mask for a certain column. You can also set it up to have a lookup combo box or any other ComponentOne control that supports this feature. Simply by being connected to this column, the ComponentOne control will automatically reflect those definitions.

    Read-only calculated columns can be specified in the C1ViewSetDesignerForm using any .NET-compatible language, or as part of the SQL-like statement that defines the view. The column expressions are evaluated at run time as navigation and updates occur through interaction with any bound control.

    Column and row level constraints can be specified in the C1ViewSetDesignerForm using any .NET-compatible language. The expressions are evaluated at run time as updates occur through interaction with any bound control.

    See Also