ComponentOne ADO.NET DataExtender
ADO.NET DataExtender Task-Based Help / Composite Row Editing
In This Topic
    Composite Row Editing
    In This Topic

    This topic demonstrates the behavior of composite rows after editing. It assumes you have created a project with a textbox, a button and three DataGridViews. One grid is bound to a C1DataViewSet and the other two are bound to a dataset. To begin, complete the following steps:

    1. From the C1ViewSetDesignerForm, create new C1DataView with the following definition to establish a composite view with an outer join between the Orders and Order Details tables: SELECT o.OrderID, o.CustomerID, od.* FROM Orders AS o OUTER JOIN [Order Details] AS od
    2. Connect DataGridView1 to the C1DataView by setting its DataGridView.DataSource property to C1DataViewSet1 and DataGridView.DataMember property to DataView.
    3. Set the DataGridView.DataMember property for dataGridView2 and dataGridView3 to Orders and Order Details, respectively. Then set the DataGrid.DataSource property for both DataGrid2 and DataGrid3 to nwindDataSet1.

      dataGridView2 and dataGridView3 are now bound to Orders and Order Details DataTable(s) from the nwindDataSet1 DataSet, that is, to the base tables on which the view is based.

    4. Create an Update button to the right of the textbox. See Updating a C1DataView Definition for instructions on this.
    5. Run the application and begin editing the composite rows to view their behavior.

    Sample Available

    For the complete sample, see the CompositeRowEditing sample, which is available for download from the ComponentOne HelpCentral Sample page.

    See Also