Hello,
I am using the ui.igGridGroupBy component to display summaries after the title and count of my rows in the grid within the context of grouped rows.
I have referred to this page: https://www.igniteui.com/grid/grouping to achieve this. However, I have noticed some issues, particularly with date column summaries. I use the "columnSettings summaries"
With all summaryFunctions, the date format appears to be transformed into a number, resulting in strange results. For example, the date "29/04/1997 02:00" (French date notation) is transformed into "29,041,997,020,000". This happens with all date formats, whether it's in English, French, or any other language.
If you would like to test, here is a fiddle based on the page I mentioned earlier: http://jsfiddle.net/7e6y0box/106/
How can I resolve this issue?
Thank you in advance for your response!
Hello Vincent,
Thank you for posting in our community!
I have been looking into your question and after an investigation what I could say is that although the described behavior is reproducible it is also expected.
The reason for the summary value to be formatted from the following "29/04/1997 02:00" to the following "29,041,997,020,000" is because the summaries are a list of aggregation functions to calculate column values for each group and the summary result is expected to be of type number. This is also the reason for the summaryFormat option’s default value to be #.00 which shows two digits after the decimal place since the value is expected to be a number.
Having this in mind, in case you require to display date formatted values as summary values, I would suggest using an approach similar to the one demonstrated in the following forum post here.
Additionally, here could be found a small sample for your reference. Please test it on your side and let me know if you need any further assistance regarding this matter.
Looking forward to your reply.
Sincerely, Riva Ivanova Associate Software Developer
I have looked into the solution you suggested. Using a regex does not suit me because dates can have multiple formats (including with time or different formats depending on the language).
I have analyzed what is actually happening, and it seems to be related to the grouping column. The format that will be in the summary is determined based on the grouping column, not the column for which we want to create the summary. So, if we group by a date column, the numeric columns will be transformed into dates, and vice versa. I invite you to take a look at this fiddle: http://jsfiddle.net/q8e3Lg5y/4/
I have opened a support ticket because I would like this bug to be resolved.
However, thank you for taking the time to respond to me.
Best regards