Dapfor allows you to perform different functions which includes column grouping. Most frequent methods of working with data grouping are shown below: C# Header header = ...; Code: Column column1 = header["Column1"]; Column column2 = header["Column2"]; column1.Grouped = true; //Group the content by the first column column1.Grouped = true; //Turn on multiple grouping column2.Grouped = true; Debug.Assert(header.GroupedColumns[0].Id == "Column1"); Debug.Assert(header.GroupedColumns[1].Id == "Column2"); Debug.Assert(column1.GroupIndex == 0); Debug.Assert(column2.GroupIndex == 1); Debug.Assert(header.GroupedColumns.Count == 2); //Enumerate all grouped columns foreach (Column column in header.GroupedColumns) { //Some code here... } //Ungroup the content header.GroupedColumns.Clear();
Hi, You can check this Code: Header header = ...; Column column1 = header["Column1"]; Column column2 = header["Column2"]; column1.Grouped = true; //Group the content by the first column column1.Grouped = true; //Turn on multiple grouping column2.Grouped = true; Debug.Assert(header.GroupedColumns[0].Id == "Column1"); Debug.Assert(header.GroupedColumns[1].Id == "Column2"); Debug.Assert(column1.GroupIndex == 0); Debug.Assert(column2.GroupIndex == 1); Debug.Assert(header.GroupedColumns.Count == 2); //Enumerate all grouped columns foreach (Column column in header.GroupedColumns) { //Some code here... } //Ungroup the content header.GroupedColumns.Clear(); Thanks