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
100
Group by Field in Code behind
posted

Hi,

 how can I group by a field in code behind?

 

best regards

Parents
  • 180
    Verified Answer
    posted

     Hi,

    try this

    FieldSortDescription
    categorySort = new FieldSortDescription();
    categorySort.Direction =
    ListSortDirection.Descending;
    categorySort.FieldName =
    "GroupCategory";
    categorySort.IsGroupBy =
    true;
    xamDataGrid1.FieldLayouts[0].SortedFields.Add(categorySort);
     
    Regards,
    atus

Reply Children
No Data