Home Forums WinForms controls Xceed Grid for WinForms Sort a grouping

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

    Thanks to everyone who helped me earlier. I’m faced with a different problem now. I am grouping a datagrid by one column, but I’d like to sort by the highest value in another column of each grouping. Every row in a group is related. A simple example would be to list the store chains and city they are in who bought your product.

    Gifts Galore / New York / 50,000
    Gifts Galore / Chicago / 45,000
    Gifts Galore / Kansas City / 40,000

    Book Palace / Tampa Bay / 47,000
    Book Palace / Chicago / 40,000
    Book Palace / Houston / 39,000
    Book Palace / Seattle / 35,000

    The highest value in each group counts for the group sorting, then by the value within each group. I’m not sure how do to that.
    Thanks in advance.

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

    User (Old forums)
    Member
    Post count: 23064

    I think you just have to set the <b>SortDirection</b>-property of the 3rd column to <b>Xceed.Grid.SortDirection.Descending</b>.

    Imported from legacy forums. Posted by Tommy (had 3090 views)

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