How to have Grouped Row display a full subgrid vs just rows

Posted by: david.mcdonald on 2 April 2020, 2:13 am EST

  • Posted 2 April 2020, 2:13 am EST


    I have a dataset over 500,000 rows. For performance reasons I only load 100 rows at a time in my DataGrid. When I group on a column, I retrieve from the database one single row for each Group that will be created. When I click the "+" to expand the rows, I would like a full subgrid to appear with all the related rows for that group.

    Do you have some code that shows how to remove the single item row and insert a subgrid? Do I have to create a template row? Please see the attached image file for a further description.

    Please note the solution to this needs to be in C# and not XAML code. Thanks for your assistance. I appreciate it.


  • Replied 2 April 2020, 2:16 am EST

    Also, please note I've been assuming I need to do this using a template row. I am open to how this is achieved even if it does not require a template row.

    Thanks very much for your assistance.

  • Marked as Answer

    Replied 2 April 2020, 10:02 pm EST

    Hi Dave,

    We understand your concern. However, this can't be achieved because of design limitations as discussed earlier. Please refer to the following cases for our previous discussions:

    Forum Case:

    S1 Case:

    We are sorry for the inconvenience.

  • Replied 6 April 2020, 10:49 pm EST

    Hi Basant,

    Thanks for your assistance in all of this. I appreciate it. I have been trying to figure out how to take a single detail row within a group, and replace it with a template row which has a subgrid of all the data the group row represents. Unfortunately as you mentioned it cannot be done. The DataContext cannot be overwritten for the detail row as it can for the group header row.

    Thanks again for your assistance. We can close this ticket.

  • Replied 7 April 2020, 3:52 pm EST

    Thanks for your understanding and acknowledgement, Dave. It's good to hear that I could make you understand the gap between the desired behavior and the design of DataGrid.

    Best Regards,
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels