GridGroupingControl Class

Represents a control that provides support for displaying ADO.NET data and other datasources in a grid. Data will be loaded from the given datasource and changes will be written back to the datasource. Both flat tables and hierarchical data can be displayed. Records can be grouped into categories and summaries can be displayed for each group.
Object Model
GridGroupingControl ClassGridTableCellAppearance ClassGridTableBaseStyleCollection ClassGridTableBaseStyle ClassGridGroupOptionsStyleInfo ClassGridTableCellAppearance ClassGridEngine ClassGridGroupDropArea ClassGroupPanel ClassGridGroupOptionsStyleInfo ClassGridPropertyTypeDefaultStyleCollection ClassGridPropertyTypeDefaultStyle ClassRecordNavigationBar ClassRecordNavigationControl ClassSourceListSet ClassSourceListSetEntry ClassGridTable ClassGridTableControl ClassGridTableDescriptor ClassGridTableModel ClassGridTableOptionsStyleInfo ClassGridGroupOptionsStyleInfo Class
<DescriptionAttribute("Displays and groups hierarchical ADO.NET data and other datasources in a grid")>
<ToolboxBitmapAttribute(Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl, "ToolboxIcons.GridGroupingControl.bmp")>
<DesignerSerializerAttribute("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
Public Class GridGroupingControl 
   Inherits System.Windows.Forms.Control
   Implements Syncfusion.Grouping.IEngineSource, Syncfusion.Grouping.ITableEventsTarget, Syncfusion.Windows.Forms.IVisualStyle 
Dim instance As GridGroupingControl
[Description("Displays and groups hierarchical ADO.NET data and other datasources in a grid")]
[ToolboxBitmap(Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl, "ToolboxIcons.GridGroupingControl.bmp")]
[DesignerSerializer("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public class GridGroupingControl : System.Windows.Forms.Control, Syncfusion.Grouping.IEngineSource, Syncfusion.Grouping.ITableEventsTarget, Syncfusion.Windows.Forms.IVisualStyle  
To display a table in the GridGroupingControl at run-time, set the DataSource and DataMember properties to a valid datasource. The following datasources are valid:
  • A DataTable
  • A DataView
  • A DataSet
  • A single dimension array
  • Any component that implements the IListSource interface
  • Any component that implements the IList interface.

GridGroupingControl is a user control that hosts a GridTableControl, a GridGroupDropArea, and a RecordNavigationBar.

Its main properties for the DataModel are: DataSource, DataMember, Engine, TableDescriptor, and Table.

Properties for user display controls are: TableControl, GridGroupDropArea, and RecordNavigationBar.

The GridGroupingControl provides properties to get / set the DataSource using the DataSource and DataMember properties. The DataSource can be set through the designer.

The TableControl property gives access to the hosted GridTableControl. The GridTableControl is a grid derived from Syncfusion.Windows.Forms.Grid.GridControlBase.

The GridGroupDropArea property gives access to the hosted GridGroupDropArea control. Its purpose is to allow dragging header columns from the GridTableControl for user-interactive grouping of records. You can hide and show this area with the ShowGroupDropArea property.

The RecordNavigationBar property gives access to the hosted Syncfusion.Windows.Forms.RecordNavigationBar control. You can show or hide the record navigation bar with the ShowNavigationBar property.

The GridTableControl is the main element in the GridGroupingControl. The GridTableControl displays the rows from the Syncfusion.Grouping.Table.DisplayElements collection of the Table using schema information stored in the TableDescriptor.

TableDescriptor gives access to the table schema information of the root table in the datasource.

The TableDescriptor object is instantiated by the GridEngine class and initialized with default schema information from the list assigned to DataSource.

The GridEngine is accessed through the Engine property. The GridEngine object is instantiated with the virtual CreateEngine method. If you want to subclass the GridEngine, you should override this method.

The Engine object is the main grouping engine object. It is derived from the Syncfusion.Grouping.Engine base class and adds Windows Forms specific functionality such as support for a Forms BindingContext and CurrencyManager. GridEngine also has special overrides of the virtual Engine.CreateTableDescriptor and Engine.CreateTable methods so that the grid-specific derived GridTable class (derived from Syncfusion.Grouping.Engine) and GridTableDescriptor class (derived from Syncfusion.Grouping.TableDescriptor) are instantiated.

There is only one GridEngine object for a GridGroupingControl. GridTableDescriptor and GridTable objects on the other side can be more than one when hierarchies are displayed. For each hierarchy level, a GridTableDescriptor and GridTable are initialized. For example, if you have an ADO.NET DataSet with three tables: "Products", "Orders", and "OrderDetails", there will be three GridTableDescriptors and GridTables.

Relations between tables are defined with a GridTableDescriptor.Relations collection of a TableDescriptor. Each TableDescriptor can have one or multiple Syncfusion.Grouping.RelationDescriptor objects. A Syncfusion.Grouping.RelationDescriptor defines the foreign key columns in the parent table, a child TableDescriptor with information about the related child table and the primary key columns in the child table.

The GridTable object is instantiated by the GridEngine class. The Table object manages the records from the engine's DataSource and provides access to records and grouped elements through several collection classes. The most important collection used by the GridTableControl is the DisplayElements collection. This collection provides the GridTableControl with information on which element to display at a row. It returns elements such as CaptionSection, RecordRow, SummaryRow, and others. Based on the elements returned by this collection, the GridTableControl will display a record, a summary or a group caption bar. There are several collections returned such as Records which contains all records in the table. FilterRecords contains all visible records.

Inheritance Hierarchy



Syncfusion.Grid.Grouping.Windows: 18.2460.0.44

See Also