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
60
Hide Parent Row when children filtered
posted

Hi,

I have filtering on a grid set to AllRowsInBand. When I filter the child rows I would like to hide any parent rows that have no children due to the filter being applied. I've tried doing the following in FilterRow but it doesn't have the desired effect.

            if (e.Row.HasParent())      //child row
            {
                if (e.Row.ParentRow.ChildBands[0].Rows.FilteredInRowCount == 0) // Visible Children
                    e.Row.ParentRow.Hidden = true;
            }

Can anyone help with this?

Regards,

Martin