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
25
How Can I Hide XamGrid Cell-Merging Group Summary Rows While Retaining Grid Summary Row?
posted

Hi,

How do I hide the summary rows that appear after groups when cell-merging groups and retain the summary row for the grid?

For purposes of clarity, I have attached a picture using the cell-merging on this sample.

The item surrounded with the green is the item I would like to retain (the summary row for the grid) and the red items are the item I would like to hide (the summary rows for the groups).

 

Thanks,

Sean

  • 34430
    Verified Answer
    Offline posted

    Hello Sean,

    Thank you for your post!

    I have been investigating into this issue, and I would recommend that you begin by writing an implicit style for CellsPanel. The CellsPanel is the panel that holds the cells that make up a row in the XamGrid. In this style, you can include an EventSetter targeting the Loaded event so that you can catch each row as it is created in the XamGrid. In the handler for this Loaded event, you can cast the sender of it to a CellsPanel object and check the Row property on it. The summary rows in question here will have a row property of the type MergedSummaryRow. If this is the case, I would recommend that you set the height of that particular CellsPanel to zero, as this will hide the panel and the space allotted to it.

    I have attached a sample project to demonstrate the above. I hope this helps you.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

    XamGridMergeSummariesCase.zip