Hi, can UltraGrid meet the requirement as follows:
there are 6 rows and 3 columns, the target rows will be 4 rows after it is group by with the COL1 and COL2.(just like the SQL group by: SELECT * FROM XXX GROUP COL1,COL2)
The raw data given by XML:==========================|#|COL1 | COL2 | COL3|=|======================|1|A | B | 2|-|----------------------|2|A | B | 1|-|----------------------|3|M | R | 4|-|----------------------|4|X | C | 5|-|----------------------|5|X | C | 2|-|----------------------|6|X | N | 6|-|----------------------
The target rows to by shown in grid on the winform:+++++++++++++++++++++++++++++++++++++==========================| |COL1 | COL2 | COL3|=|======================|-|A | B | 3|-|----------------------|-|M | R | 4|-|----------------------|-|X | C | 7|-|----------------------|-|X | N | 6|-|----------------------
is it possible for UltraGrid?
Thansk a lot.Felix
A mistake :
Thanks.
Hello Felix,
I wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.
Hi,
Is there any demo code snippet for the usage of GroupByComparer?
Hello felixsen,
Sorry... I made a mistake. What you need here is a GroupByEvaluator, not a GroupByComparer. I'm sure there are some samples of these here on the forums. But your situation is a little tricky. You won't be able to get exactly what you have here - and I'm not sure what assumptions you can make about the data (is it always in order) and what parts of your requirements are flexible.
In the simplest case, what you would do is handle GetGroupByValue and combine the two values from Col 1 and Col 2 into a single value.
I have a attached a sample project here which is about as close as I can get to what you want. I am assuming that the data in your data source is always sorted in the correct order.