Home Forums WinForms controls Xceed Grid for WinForms Treat a GroupManagerRow like a DataRow

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15659 |

    Hello,

    I am working with the Xceed Grid Component. I am trying to create a parent/child relationship between rows using the Group object. The goal is to have a set of parent rows that can expand to display their child nodes. Below is a text example:

    | Col 1 | Col 2 | Col 3 |
    |————————-|
    |+Par 1 | Val 1 | Val 1 |
    |+Par 2 | Val 2 | Val 2 |
    |+Par 3 | Val 3 | Val 3 |

    Par 1 Row gets expanded.

    | Col 1 | Col 2 | Col 3 |
    |————————-|
    | -Par 1 | Val 1 | Val 1 |
    | Kid 1 | Val # | Val # |
    | Kid 2 | Val # | Val # |
    |+Par 2 | Val 2 | Val 2 |
    |+Par 3 | Val 3 | Val 3 |

    Unfortunately, there doesn’t seem to be a way to make a Group’s GroupManagerRow behave like a DataRow. I found an example online describing how to override the GroupManagerRow and define new OnPaint / PaintBackground / PaintForeground Event Handlers. This seems a little excessive for what I want to do.

    Another solution is to extend the GridControl and manage the parent/child relationship on my own without using Groups. However, that is a whole new can of worms – sorting is the first problem that comes to mind.

    Is there something that I am missing? Is there a way to treat a Group’s header like a DataRow?

    Thanks,

    John

    Imported from legacy forums. Posted by John (had 1939 views)

    Xceed Support
    Member
    Post count: 5658

    From what you are trying to achieve, it seems that Master/Detail grids is the way to go.

    Imported from legacy forums. Posted by CharlesB (had 2772 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.