(React) Force Felxgrid to sort by a separate dropdown

Posted by: igelfenbeyn on 22 January 2021, 4:35 am EST

  • Posted 22 January 2021, 4:35 am EST

    Hello,

    I have a dropdown that lists all the columns in the grid. When the user is selecting a different value from the dropdown, i want the grid to re-resort based the that value. How can do force the grid to do that?

    Thanks

  • Posted 24 January 2021, 5:59 pm EST

    Hi Igor,

    You will need to use the sortDescriptions array of CollectionView for this. Handle the selectedIndexChanged event of the DropDown and push an instance of SortDescription to this array. Please refer to the sample link below for reference:

    https://stackblitz.com/edit/react-1ybnes

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels