Home Forums WinForms controls Xceed Grid for WinForms fixedfooter that is sum of group a minus group b

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14758 |

    I have a grid layout that groups on a filed named type.
    Possible values = buy,sell
    I group the grid on this field, and have a summaryrow for each group that sums quantity.
    The quantity is always a positive number.

    My problem is, I need a fixedfooter for the grid that is the sum of buy quantity minus sell quantity.
    Any help on how I can accomplish this is appreciated

    Imported from legacy forums. Posted by MLefebvre (had 2407 views)

    User (Old forums)
    Member
    Post count: 23064

    To add additional info, this is for VB.NET 2003.
    And, I build the Grid in code, as the datasource changes via user choices, so I would like a VB.NET example if possible.

    Imported from legacy forums. Posted by MLefebvre (had 291 views)

    User (Old forums)
    Member
    Post count: 23064

    You will not be able to use the SummaryRow to do this, since the it runs a statistical function on all the rows (e.g. sum, average, mean, etc…). It cannot sum a part and substract another part.

    You will need to create you own calculating row. Basically, add a ValueRow in the FixedFooterRows of the grid, then in an event monitoring changes to your SummaryRow, like the SummaryCell.ValueChanged event, get the values of the total of each group, substract them, and display the result in the ValueCell.

    Imported from legacy forums. Posted by André (had 3580 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.