Sort as per rowgroup subtotals.

Sort as per rowgroup subtotals.

abhayps11abhayps11 Posts: 3Questions: 1Answers: 0

Consider the example: https://codepen.io/jasonblewis/pen/PWgwPL
If I want to sort according to the salary, I want to sort as per row groups data i.e the grey parts, not the inside table data.

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @abhayps11 ,

    You can do something like this here. It's currently a little crude, but that will give you a good head start!

    Hope that helps,

    Cheers,

    Colin

  • abhayps11abhayps11 Posts: 3Questions: 1Answers: 0

    Hi Colin,
    Thanks for the reply. But what I wanted is to sort as per the row group values i.e as per the row subtotal.

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    hi @abhayps11 ,

    Sorry, I totally misread that. If you change your order to be orderFixed, that will always apply the city search first before the user's search - meaning the group remains the same. See your modified example here.

    Cheers,

    Colin

  • abhayps11abhayps11 Posts: 3Questions: 1Answers: 0

    Hi @colin ,
    I think I didn't explain the question well. So what I need is to sort the cities according to the total salary of the sub-rows. You see the total at the end of the row with city names. I want to sort according to that. Such that city with the highest total comes first.
    I want to apply the search on the row grouped rows.

  • fippyfippy Posts: 1Questions: 0Answers: 0

    I would love an answer to this problem too...

    specifically the ability to sort by grouped totals

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @fippy ,

    This thread should help, it's asking the same thing.

    Cheers,

    Colin

This discussion has been closed.