Home Forums WinForms controls Xceed Grid for WinForms Grouping by DateTime

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #16024 |

    I have a question about grouping. I have a DateTime field from a Database that is being Displayed a a Short Date. However, when I go to group them it is grouping by the full Date and Time, which leads to basically every record being grouped separately.

    Is there a way around this?

    I am currently doing the grouping in code:

    Dim groupCol As New Group
    groupCol.GroupBy = “DateCreated”
    groupCol.HeaderRows.Add(New GroupManagerRow())


    Imported from legacy forums. Posted by Douglas (had 1987 views)

    Xceed Support
    Post count: 5658

    You could use some <a href=”http://doc.xceedsoft.com/products/Xceedgrid/Manual_grouping.html”>Custom Grouping</a> in this case.

    You could also try to subscribe to the GroupAdded event of the GridControl and modify the e.Group.Title value. You could assign it a “ToShortDateString()” of the returned value e.DataRow.Cells[…].Value).

    Imported from legacy forums. Posted by CharlesB (had 3025 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.