Hi,
I am grouping a DateTime column and I am using GroupByMode = FieldGroupByMode.Date. But the problem is it gets grouped with min date.
I then formatted the date in GroupByRecordPresenter_Loaded event. It then looked fine. Like follows:
But then if there is a column already grouped lets say column 'A' and I group my DateTime column after that and then I remove column 'A' from group pane, group header description of my Datetime column again gets the minimum datetime like follows:
Will be grateful for your help.
Thanks,
Imad.
Hello Imad,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Hi Stefan,The problem is solved. It was due to converter that I was using. Following 2 lines in the code that I posted above:f.Converter = _MyDateTranslator;f.ConverterParameter = f.Name;I am not using these any more and its displaying datetime in group header correctly.
Thanks.
I have been looking into the screenshot and the code you have provided, but it seems like I am missing something about your scenario, so could you please send me an isolated sample project, where this is reproduced, so I can investigate it further for you.
Looking forward for your reply.
still waiting for response....
Hi Stefan/ Andrew,
Infact the actual problem is differen to what I realized initially.
I am using GroupByMode = FieldGroupByMode.Date but its grouping all items in one group instead of separate group of dates.
Here is how I am creating my field:
f.Converter = _MyDateTranslator;f.ConverterParameter = f.Name;f.Settings.LabelTextAlignment = TextAlignment.Center;f.Settings.CellVisibilityWhenGrouped = Visibility.Collapsed;f.DataType = typeof(DateTime);f.Settings.EditorType = typeof(XamDateTimeEditor);f.Settings.EditorStyle = new Style(typeof(XamDateTimeEditor));f.Settings.EditorStyle.Setters.Add(new Setter(XamDateTimeEditor.FormatProperty, "G"));f.Settings.SortComparer = new MyDateTimeComparer();f.Settings.AllowGroupBy = true;f.Settings.Width = FieldLength.Auto;f.Settings.GroupByMode = FieldGroupByMode.Date;
I am missing anything here?
waiting for your reply.