How can i make the grouping dynamically in the code?
Field fld = this.xamDataGrid1.FieldLayouts[0].Fields["CustomerName"]; fld.Settings.SortComparisonType = FieldSortComparisonType.CaseInsensitive; FieldSortDescription fsd = new FieldSortDescription(); fsd.Field = fld; fsd.Direction = System.ComponentModel.ListSortDirection.Descending; fsd.IsGroupBy = true; this.xamDataGrid1.FieldLayouts[0].SortedFields.Add( fsd);
Field fld = this.xamDataGrid1.FieldLayouts[0].Fields["CustomerName"];
fld.Settings.SortComparisonType = FieldSortComparisonType.CaseInsensitive;
FieldSortDescription fsd = new FieldSortDescription();
fsd.Field = fld;
fsd.Direction = System.ComponentModel.ListSortDirection.Descending;
fsd.IsGroupBy = true;
this.xamDataGrid1.FieldLayouts[0].SortedFields.Add( fsd);
Joe