I wanted to be able to expand SOME groups, but not all. It turned out to be quite easily, by looking at the GroupByField of the GroupByRecord. Of course, there are other useful things you can do with this, like setting the Description property to different values/formats according to the field being grouped.
private void XamDataGridDetails_InitializeRecord(object sender, Infragistics.Windows.DataPresenter.Events.InitializeRecordEventArgs e){ if (e.Record != null) { GroupByRecord gbr = e.Record as GroupByRecord;
if (gbr != null) { if (gbr.GroupByField.Name.Equals("SomeColumnName")) gbr.IsExpanded = true;} } }}
Hello tbeaulieu,
Thank you for your post. I am sorry for the late reply, but please make notice that Infragistics employees are trying to respond to all the posts at the community. As for your post I find it very useful and I am glad you wrote it. Now other users may benefit from it.
Thank you again.