WPF Infragistics xamDataGrid - CollectionView GroupDescriptions not recognized like with WPF DataGrid
We're looking at upgrading our WPF DataGrid based application to one that uses the Infragistics xamDataGrid DataGri开发者_运维知识库d 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?
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
精彩评论