ComponentOne DataObjects for .NET
Using the C1SchemaRef Control
DataObjects for .NET Task-Based Help > Using the C1SchemaRef Control

To use the C1SchemaRef component to represent a C1SchemaDef component, complete the following steps:

  1. Add a C1SchemaDef control to your form and create a data schema.
  2. Add a new component class file to your project by selecting the Project menu and clicking Add New Item, Component Class.
  3. Enter a name for the class in the Name text box and click Add.
  4. Double-click the C1SchemaRef component in the Toolbox to add it to the design surface of the component class file.
  5. In the Visual Studio Properties window, set the SchemaDef property of the C1SchemaRef to the C1SchemaDef you created in step 1.
    Note: When working with multiple files using C1SchemaRef, the file containing the C1SchemaDef component must be open.
  6. Add any desired business logic components such as C1TableLogic and C1DataSetLogic to the component class file.
  7. For each business logic component, set its SchemaComponent property to the C1SchemaRef component added in step 4.
  8. If a C1TableLogic component was added, choose a table from the Table property drop-down box in the Visual Studio properties window. If a C1DataSetLogic component was added, select a data set from the DataSetDef property drop-down box.
  9. In the initialization section of your code, call Add to add a C1SchemaRef component to the list of C1SchemaRef components associated with the C1SchemaDef component.