Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
425
How to override "Group By" behavior for DateTime Column?
posted

Hi,

I've tried make my grid group by a "DateTime" column based on the Date rather than Date & Time.  If I just use the default Group By header and drag my datetime column into the group by header, it groups the row by the exact date & time, which made each row its own group since all rows does not have the exact date & time (i.e. there are many rows within one day but different times).

Thanks!

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                e.Layout.Bands[0].Columns["DateTime 1"].GroupByMode = GroupByMode.Date;
            }

        You might want to try GroupByMode.OutlookDate, instead.  

     

     

Children