3

We're looking at upgrading our WPF DataGrid based application to one that uses the Infragistics xamDataGrid DataGrid control.

One of the nice things about the WPF DataGrid was that it looked at GroupDescriptions specified on the CollectionView that wrapped your collection, and automatically created those groups on the DataGrid.

The Infragistics xamDataGrid seems to ignore these group descriptions.

Does anyone know how to get the GroupDescriptions in the ListCollectionView/CollectionView that the xamDataGrid is bound to, to show on the xamDataGrid automatically, or does this require writing additional code?

Gaurav Sharma
  • 2,680
  • 3
  • 26
  • 36
  • Did you consult the Infragistics NetAdvantage forum for this? They will be in better position to answer it. – WPF-it Oct 05 '11 at 04:19

1 Answers1

1

look at these forum entry and you can see that this behaviour currently not supported

http://forums.infragistics.com/forums/p/49473/261253.aspx#261253

you must explicit specify what you want

this.FieldSettings.AllowGroupBy = true;
this.GroupByAreaLocation = GroupByAreaLocation.AboveDataArea;

foreach (Field field in this.FieldLayouts.First().Fields) {
  if (field.Name.Euals(theFieldNameThatYouWant)){
    bool groupBy = true;
    field.Owner.SortedFields.Add(new FieldSortDescription(field.Name, ListSortDirection.Ascending, groupBy));
  }
}

hope this helps

punker76
  • 14,326
  • 5
  • 58
  • 96