TMSFMXGrid aggregates without setting a group ?

Hello,

How can I use aggregates without setting a group ?
I've tried the code below but it doesn't works as expected


  TMSFMXGrid1.SortData(1,sdAscending);

  TMSFMXGrid1.Options.Grouping.MergeHeader := true;
  TMSFMXGrid1.Options.Grouping.Summary := true;

  TMSFMXGrid1.Group(0); // I don't want to define a group, just want to see some Sum and count for al records available in the grid

  TMSFMXGrid1.GroupSum(6);
  TMSFMXGrid1.GroupAvg(5);
  TMSFMXGrid1.Options.Sorting.Mode := gsmNormal;


Hi, 


The GroupSum and GroupAvg functions are specifically designed for use in combination with grouping. Without grouping you will need to manually add a new row and use the   TMSFMXGrid1.ColumnSum functions to set the value at the last row.

Kind Regards, 
Pieter

Pieter Scheldeman2016-02-24 11:16:32

Hello Pieter,

Will use TMSFNCGrid1.ColumnSum