Welcome to the Xceed Community | Help
Community Search  
More Search Options

Custom grouping not working for me

Sort Posts: Previous Next
  •  03-03-2010, 10:54 AM Post no. 25989

    Custom grouping not working for me

    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

  •  03-03-2010, 1:45 PM Post no. 25992 in reply to 25989

    Re: Custom grouping not working for me

    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

  •  03-04-2010, 10:47 AM Post no. 25999 in reply to 25992

    Re: Custom grouping not working for me

    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. Confused

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.