In the previous step, you created a basic Windows Forms application and added FlexPivotPage control to it. In this step, you begin with connecting the FlexPivotPage control to C1DataEngine.
To connect the FlexPivotPage control to C1DataEngine, perform the following steps.
- Switch to the code view i.e. Form1.cs and initialize workspace within the form's constructor.
- Initialize full path to the folder where the DataEngine stores data in files, and an SQL connection above the Form's constructor using the following code.
Initially, the DataEngine is empty but it automatically fills with files as and when the data is added to it.
- Initialize a standard connection string to the database file being used.
- Switch to the Design view and subscribe Form1_Load event from the Properties window.
- Add the following code to the event handler created for Form1_Load event in the code view.
With this, you have successfully connected the FlexPivotPage control to the DataEngine.