VS Demo
This is a step-by-step tutorial on binding a data source to the
Grid Grouping control using Visual Studio. This involves two major tasks. The first task is to place the Grid Grouping
control on the form. The second task is to use the designer to set up data binding to an Access data file.
From the Syncfusion tab in the toolbox, drop a Grid Grouping control onto
your form. During this process the SmartTag drop-down will appear. Open the selection drop-down
that is beside the GridGroupingChooseDataSource selection, and you will see
the screen depicted below:
- Click the Add Project data source link in the drop-down shown in the above image.
The following window will be displayed.
- On the above display, select Database and click Next.
Doing so will bring up this window.
- Click the New Connection button.
The following window will be displayed.
- In the above window, click the Change button to select the Microsoft
SQL Server Database file option.
The following window will be displayed.
- Click the Browse button and select the following path:
Program Files\Syncfusion\Essential Studio\{Version installed}\Windows\Data\NORTHWND.MDF (depending upon your installation folder).
- Click Ok. The screen below will be displayed without the
database file name entry being set.
-
Click the Next button, which opens a dialog box asking whether you want to save and deploy a copy of the MDB file with your project.
- Click No to indicate that you do not want to save the MDB in the project
else click Yes.
The following screen will appear.
- In the drop-down, select the Suppliers table and set it as the Grid Grouping
control’s data source. The columns in the Grid Grouping control will
now be populated as depicted in the image below.
- Finally, use the Grid Grouping control's property grid, shown in the
image below, to set the
anchor properties to all sides. This ensures that the Grid Grouping control can be easily sized with the form. Notice that the
data source property, shown in the
property grid, has been set as a result of the work completed in the previous steps.
- To allow grouping at run time, the Grid Grouping control displays a drop panel.
This can be used to drag columns and drop them in order to group them. To
display this drop panel, you need to set the Show Group Drop Area property as shown in the image below.

- Now you can run the application to see the Grid Grouping control display data from the MDB file without having
to write a single line of code.
Your form should look similar to the one shown below.
- To group by company name, perform a mouse-down operation on the
column header and drag it to the drop area, as illustrated in the image below.
- Below is the display after the grouping. Notice that each set of grouped
values has its own Caption row and its own Add New row. Each group has its own Plus-Minus cell that will let you expand
or collapse the group.