Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8963991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:29:02+00:00 2026-06-15T16:29:02+00:00

I am trying to implement custom grouping in the Janus GridEx control. I have

  • 0

I am trying to implement custom grouping in the Janus GridEx control. I have a column that has data that is DateTime, but when I group on that column, I want the data to group based on only the Date portion of that data.

Reading the Janus documentation, it looks like adding a GroupComparer to a Column should accomplish this:

' Code that sets up my Janus GridEx
...
...
grdResults.RootTable.Columns("DateDue").GroupComparer = New GroupByDateComparer()
...
...

My IComparer class…

Public Class GroupByDateComparer
    Implements IComparer
    Public Function Compare(a As Object, b As Object) As Integer _
                                      Implements IComparer.Compare
        Select Case DateDiff(DateInterval.Day, a.Date, b.Date)
            Case Is < 0
                Return -1
            Case 0
                Return 0
            Case Is > 0
                Return 1
        End Select
        Return 0
    End Function
End Class

My code builds.
The line of code where I assign a new instance to the GroupComparer runs.
But the Compare() function is never called.

Has anyone managed to implement this feature of the Janus GridEx control?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:29:03+00:00Added an answer on June 15, 2026 at 4:29 pm

    Okay, it took me longer than it should have. It turns out the Comparer was working perfectly, but it wasn’t ‘sticking’ to the column. I found that if I check if it exists in the RootTableChanged event and re-attach it if it isn’t it all works fine…

    Private Sub grdResults_RootTableChanged(sender As Object, e As EventArgs) _ 
                                            Handles grdResults.RootTableChanged
    
        If grdResults.RootTable.Columns.Contains("DateDue") AndAlso _ 
               grdResults.RootTable.Columns("DateDue").GroupComparer Is Nothing Then
            grdResults.RootTable.Columns("DateDue").GroupComparer = New GroupByDateComparer()
        End If
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement a custom panel control that would act as a naming
I'm trying to implement a custom field type for my Symfony2 forms but for
I'm trying to implement a custom tab bar which is scrollable and has paging
I'm trying to implement a custom control in C# and I need to get
I'm trying to implement a custom validation annotation in Seam. We have a list
i am trying to implement a custom tab control in my win32 window, for
I'm trying to implement a custom class for dataannotations that retrieves error messages from
I'm trying to implement a custom log4net logger/logmanager so that I can add a
I am trying to implement a custom control using a RowClickableGridView class provided on
I'm trying to implement a custom combobox options popup, so that near each option

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.