Hi,
I'm currently upgrading UltraWebGrid to WHDG and came across an issue where I need to do sum for a certain column in the grouped rows and show it in the group row summary.
There are functions for [avg], [sum], [min], [max] (either for the grouped column or another column provided by a certain key) for UltraWebGrid, I could not find the same function for WHDG's GroupedRowTextMask.
Is this something I have to do manually or already supported in newer version?
If it's still not supported, I would suggest the functions to be added in future version since it's really helpful.
I'm still on v11.1 and will change to 13.2 after all legacy controls are upgraded.
Thanks,
Charles
Hello Charles,
Thank you for your feedback.
I am glad this helped. Please let me know if you have any further questions on the matter.
Hi Hristo,
Thanks a lot!
That solved the grouping issue.
I was pretty sure I did check the HasChildGroupRows property initially, but since it always return true even for 1st column grouping, I changed it to use Count.
Thanks again!
It seems that you need to check if ChildGroupRows exist as follows:
if (groupedRow.HasChildGroupRows) { foreach (GroupedRecord groupedChildRow in groupedRow.ChildGroupRows) { SetGroupText(groupedChildRow, e); } }
Please try this and let me know if you have further questions on the matter.
It seems that I have not fully understood your issue initially. However I managed to observe this behavior in your sample and in another clean sample as well. I am currently investigating this and will keep you posted with my findings.
I've attached simplified example to use flat data and defined columns in WHDG to make it easier.
Basically, if I'm not accessing "ChildGroupRows" property the grid will display fine but the problem is the 2nd column grouping does not show the header properly on the 2nd column group as image below.
https://drive.google.com/file/d/0B-okqBLdGTTIRksxMzdqWnpCYXM/view?usp=sharing
If I change the code to access and iterate through the "ChildGroupRows" property, I get the expected header for 2nd column group as well, but the row do not display any data:
https://drive.google.com/file/d/0B-okqBLdGTTIemJpVFhDZnBmM2c/view?usp=sharing
So I don't think this has anything to do with what type/class ChildGroupRows is since it can obviously get the values to be calculated correctly nor does it use any band.
It just somehow loses the row data on screen if we touch "ChildGroupRows" property, I've tried 3rd++ column grouping and it gives the expected group headers but no row data is displayed (buttons are in expanded position but no rows there, just like on the last image).
Sorry for the trouble and thank you again. Hopefully it's not something silly on my part!