Home Forums WinForms controls Xceed Grid for WinForms Custom grouping not working for me

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17394 |

    I’m using the grid’s group area to allow users to drag columns for grouping.

    One of my columns is of a custom data type and requires custom code for comparing.

    For sorting the column, I created a custom IComparer and set the column’s DataComparer.  This works well for sorting, but not for grouping.

    But the Compare method doesn’t get called when I group this column.  And each row ends up grouped by itself.

    What do I need to do to get this custom grouping to work?

    Buzz

    Imported from legacy forums. Posted by Buzz (had 823 views)

    User (Old forums)
    Member
    Post count: 23064

    Even in the “Grouping” sample the MySubjectDataComparer’s Compare method doesn’t get called when I group by Subject.

    The documentation for DataComparer says “Gets or sets an instance of a class which implements the IComparer
    interface in order to compare the column’s data during grouping and sorting”

    So how do I get this to work?

    Please help!

    Buzz

    Imported from legacy forums. Posted by Buzz (had 387 views)

    User (Old forums)
    Member
    Post count: 23064

    Got it now.  The GroupRow’s GroupTemplate needs to be set to my custom Group.

    For some reason this Grid and the WPF DataGrid keep kicking my butt.  There are many ways to design controls like these, and I guess my way of thinking doesn’t match.

    Oh well.  But thanks for the quick, helpful response. [*-)]

    Imported from legacy forums. Posted by Buzz (had 1072 views)

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