Hi,
I'm trying to use the cxGrid to present a fairly specifically customised grid in my application. My grid has a fixed grouping setup of 2 levels, and I'm using the BandedTableView.
I am wanting to have group summaries in my grid - but ONLY on the first level of grouping, not the second. I find that if I turn on group summaries that they appear on all levels of grouping and I cannot see how to turn it off on the second level. Is there an easy workaround to this, perhaps an override of the BandedTableView?
Regards,
Sandy MacPherson
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Sandy,
There is an easy solution for your problem. To calculate summaries for a certain group column, use the Component Editor at design time, set up a summary group as you need, and link it to a group column in which you want to display this summary group's items. Please refer to the "Creating Summary Groups" topic of the ExpressQuantumGrid's help.
I've attached a sample program illustrating this solution and a screenshot of the Component Editor from my machine.
Thanks,
Eugene
Hi Eugene,
Thanks for the quick response but I think my question wasn't phrased quite right. The type of summary I am trying to get is the group footer summary, and to have the footer section appear only for the first grouping level. I've attached a slightly modified version of your demo project showing what I'm wanting, although it shows the undesired group footer for the second level.
Cheers,
Sandy
Hi Sandy,
Thank you for the question. Please give us some additional time to provide you with an answer to your question.
Thank you for your patience.
Thanks,
Eugene
Hi Sandy,
By design, footers are displayed for all groups in your GridView, and you only can hide summary items inside of them. As a workaround, you may display summary items in groups, as I've suggested above.
If you want to hide all empty footers, you may write a custom GridView class for this purpose. Please review our report Q95495 ("Selectively hide group footers, within the same group") for a sample on how this can be done.
If you need any future help, feel free to ask.
Thanks,
Eugene
Hi Eugene,
Sorry for the delay in my response. I looked at the issue you linked me to but it also isn't quite what I need. The solution I need seems to have been implemented in version 6 of the QuantumGrids (see http://www.devexpress.com/Support/Center/p/DS22427.aspx) but I still have to use version 5. Could you please provide me with a solution to this problem?
Regards
Sandy MacPherson
Hi Sandy,
Thanks for the clarification. All that's needed is to modify the sample from report Q95495 ("Selectively hide group footers, within the same group"). Just correct the overrided CalculateHeight method. Check that the GridRowFooterViewInfo's VisualLevel property is not equal to 2 and call the inherited CalculateHeight method.
I've attached the modified sample. Try it and let me know how it works for you.
Thanks,
Eugene
Perfect. Thank you very much.
Regards,
Sandy MacPherson
Hi Eugene,
I cannot seem to edit the support centre query on the website so I am sending this as an email again. How do I edit support centre issues that I created?
I have implemented your solution and it works perfectly for grid views that are in the grsStandard grouping mode, but falls apart for grid views using the grsOffice mode. I see in the grid source code that the VisualLevel is dependent on this grouping mode setting but I cannot see an easy way to get around this. The VisualLevel property comes through one less when in Office than in Standard mode, but adjusting the solution you gave to check for (VisualStyle <> 1) makes it look right but throws off the hit-testing of the row under the open one and you also lose the final summary if you open the last row in a group. Please see the attached project - I have modified the one you sent me.
Regards
Sandy MacPherson
Hi Sandy,
Thank you for the clarification. We are studying your problem, and will try to find a better solution for you. Just give us some time. Thanks for your patience.
Thanks,
Eugene
Hi Sandy,
The implementation of this feature is an intractable problem. I suggest you override the TcxCustomGridRowViewInfo.HasFooter method (and also all dependent class methods) and change its code to make the footers visible only for the first grouping level.
This solution works only for two level grouping. If you want to provide this functionality for more grouping levels, I suggest that you upgrade your ExpressQuantumGrid to the latest, v6. Sorry, but introducing this functionality in v5 will require an enormous amount of coding. You can order the upgrade via your Client Center account.
I attached a sample illustrating this solution. Try it, and let me know how it works for you.
>>
How do I edit support centre issues that I created?
<<
To edit your reports, you need first to log into the Support Center using the credentials which you utilize to download and install our products.
Thanks,
Eugene