Step 2: Configuring FlexPivotPage Control and DataEngine
In This Topic
In the previous step, you created a basic Windows Forms application and added FlexPivotPage control to it. In this step, you begin with configuring the FlexPivotPage control and C1DataEngine and connecting them to data.
To configure the FlexPivotPage control and C1DataEngine and connect them with data, 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 and DataEngine to data.
Note: WinForms .NET Edition does not include rich design-time support yet. We will enhance it in future releases.