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
240
Automatically expand group by area
posted

Hi, I have a xamDataGrid which I set the DataSource as a list of DataView:

List source= ... m_grdResult.DataSource = source

xamDataGrid correctly groups by the DataView for me but how do I set xamDataGrid to automatically expand all those group by items? I tried setting IsGroupByAreaExpanded=true but it doesn't work.

Anyone has any ideas?

Parents
No Data
Reply
  • 240
    Verified Answer
    posted

     Right. I just found the answer. I need to hook into the InitializeRecord event and do something in this vein:

     void m_grdBlotter_InitializeRecord(object sender, Infragistics.Windows.DataPresenter.Events.InitializeRecordEventArgs e)

    {

    if (e.Record.NestingDepth == 0)

    {

        e.Record.IsExpanded = true;

    }

    }

Children