Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to add a custom summary item to the grid's footer menu

$
0
0

Sometimes it's necessary to specify a way of calculating summaries that is different from the default one. Assume you don't want to take into account cells with no data when calculating summaries. It's possible to accomplish this task using two events: use the GridView.CustomSummaryCalculate event to provide a custom summary and the GridView.PopupMenuShowingevent to add a corresponding item to the grid's footer menu.
See also:
Custom Aggregate Functions

Question Comments

Added By: Sir Kevin Heathfield at: 7/23/2013 3:49:25 AM    

Not a single code comment.. Nice..

Added By: Matteo Lazzari at: 6/5/2014 3:12:58 AM    

Why do you do:

foreach (DevExpress.Utils.Menu.DXMenuItem item in footerMenu.Items)
               item.Enabled = true;

I see this is necessary for enable the menu items... But I would like to maintain disabled the summarization items not available for a particular field type (for example, the sum for the strings). Is this possible?
Thank you.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>