Binding Your Hierarchical FlexGrid to a Data Environment

Before you can use bands in your Hierarchical FlexGrid, you bind the FlexGrid to a Data Environment, which contains a top-level, parent Command object.

To bind your Hierarchical FlexGrid control to a Data Environment

  1. Drag a MSHFlexGrid control onto a Visual Basic form.

  2. From the Visual Basic Properties window, set the DataSource property to the DataEnvironment object that contains the Command object that you want to bind to the Hierarchical FlexGrid control. For example, DataEnvironment1.

  3. From the Visual Basic Properties window, set the DataMember property to a top-level, parent Command object in your Data Environment. Your data is now bound to a Hierarchical FlexGrid control.

  4. To view the data in the Hierarchical FlexGrid, select Start from the Run menu or press f5. The structure is retrieved and appears in the Hierarchical FlexGrid.