KB Article A1897
Visible to All Users

How to force the Grid to recalculate summary values

Description:
I have several buttons on a toolbar to define which type of summary values are calculated in my Grid. I can calculate summaries within the CustomSummaryCalculate event handler as my needs dictate. This works fine when an end user groups grid rows by a column(s). But I also need this event to fire when a button on a toolbar is pressed. Does the XtraGrid support this?

Answer:
The XtraGrid provides several methods for recalculating summaries. They are members of the GridView class:
 - UpdateSummary
 - UpdateTotalSummary
 - UpdateGroupSummary
You can get more details on each method in the XtraGrid's documentation.

Comments (2)

    The links in the solution are broken

    Serge (DevExpress Support) 9 years ago

      Thank you for bringing this to my attention, David. These methods became members of the GridView class a while ago. I've updated the links accordingly.

      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.