ComponentOne FlexGrid for WinForms
GroupDescription Class
Members  Example 

C1.Win.C1FlexGrid Namespace : GroupDescription Class
Describes the grouping of items using a property name as the criterion. Each group description also specifies a sort direction for the property. For example, if you group the data by Country, the grid will sort the data by country before creating the groups.
Syntax
'Declaration
 
Public Class GroupDescription 
public class GroupDescription 
Remarks
Example
private void Form1_Load(object sender, EventArgs e)
{
            _flex = new C1FlexGrid();
            _flex.Bounds = new System.Drawing.Rectangle(20, 80, 750, 550);
            this.Controls.Add(_flex);
            OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\ComponentOne Samples\\Common\\C1NWind.mdb");
            DataTable ordersTable = new DataTable();
            new OleDbDataAdapter("Select * from Orders", con).Fill(ordersTable);
            _flex.DataSource = ordersTable;

            for (int column = _flex.Cols.Fixed; column < _flex.Cols.Count; column++)
            {
                grpByCombo.Items.Add(_flex.Cols[column].Name);
            }           
            grpByCombo.SelectedIndexChanged += GrpByCombo_SelectedIndexChanged;
            grpByCombo.SelectedItem = "ShipCountry";

            //Hide the grouped column (Optional)
            _flex.HideGroupedColumns = true;
}

private void GrpByCombo_SelectedIndexChanged(object sender, EventArgs e)
{
            //setting the grid's GroupDescription property
            _flex.GroupDescriptions = new GroupDescription[] { new GroupDescription(grpByCombo.SelectedItem.ToString(),System.ComponentModel.ListSortDirection.Ascending, true) };
}
Inheritance Hierarchy

System.Object
   C1.Win.C1FlexGrid.GroupDescription

See Also

Reference

GroupDescription Members
C1.Win.C1FlexGrid Namespace