This question I think is a difficult one.
I have a grid attached to a datasource. I use the newest version of ultragrid.
I have a lot of things set in InitializeLayout, and I have implemented the multi sort column code in the AfterSortChange event and everything works fine. But now to the question. When you add a column to a group you can sum on another column for that group and you can place the sum where you like. I have set GroupBySummaryDisplayStyle, SummaryDisplayArea, BorderStyleSummaryValue. But the problem is that if you sort on one or more column, the sort is performed at group level. But what I wan't is "global" sort and also the summary. So I think I can't use grouping.
Here is an example what I wan't. The columns that are sorted is not fixed, and set by the user) The text Sumline is only by example.
The gris is sorted on Company and Customer. So when these two values changed as a group, we have to make a sumline.
Company Customer Invoice Amount
Comp 1 Cust 1 inv 1 10
Comp 1 Cust 1 inv 2 20
Sumline: 30
Comp 1 Cust 2 inv 3 45
Sumline: 45
Comp 1 Cust 3 inv 4 55
Sumline: 55
Is this possible by triggering some event, or do I have to do it at data source level?
I am not sure I understand the problem. If you group your grid by Company and by Customer, then the summary will display at each level. You will get subtotals for each customer and a summary for each customer, which is essentially what you have here, except for the Customer total. Is the problem that you do NOT want the customer total?
The description is simplified. The real problem can have up to 6 columns that are grouped. And this can give up to six group lines. And this is not what I wan't. Another problem is that the sorted columns, which are not part of the grouping are sorted relative to the groups, and not for all the data.
So it is sum rows without grouping I want. And the sum row must come after a change in specific column, and not what i mentioned earlier, when x number of sorted rows changes.
Okay. I'm still not sure I understand exactly what you mean. But the grid does not have any way to provide sub-totals like you are showing here, unless you are using OutlookGroupBy.