Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1050
grouping dynamically
posted

How can i make the grouping dynamically in the code?

Parents
No Data
Reply
  • 8576
    Offline posted
    Hi -
     
    Here's some code that groups by the 'Customer Name' field:
     

    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

     

Children
No Data