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
985
Style of GroupBy box
posted

I am using Outlook GroupBy in my grid. What I want is to have the header of the band (which contains the text about how many items there are in this group) look like it is selected when the user has one of the child rows selected or is editting a cell in one of the child rows.

Are there properties that will allow me to do that or do I  need to do this in code by catching specific events? If I need to do this in code then what evenets should I use to achieve this goal?

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    There's no property for the active GroupbyRow based on having one if it's child rows be active.

    Are you making the assumption that there will only ever be one level of grouping, and that the users cannot change that? If not, then do you want to highlight all of the GroupByRows that contain the active row?

    What I would probably do is use the AfterRowActivate event. You can get the grid.ActiveRow and if it's a data row, you can walk up to get the GroupByRow that it belongs to and apply an appearance to that row.

    You will probably want to store that row in a member variable on the form, too, so that the next time the event fires, you can reset the appearance on the previously-active GroupByRow before applying an appearance to the new one.

     

Children
No Data