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
3627
TIP: How to manipulate groups independently
posted

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;}
        }
    }
}

 

Parents
No Data
Reply
  • 138253
    Offline posted

    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.

Children
No Data