Multi sort gridview

I have not been able to see anything anywhere about a nested sorting or multi sorting of a gridview.

We would like to be able to select a column, sort, then select a secondary column and do a sub sort keeping the original sort in place.

Any ideas?

I haven’t seen that anywhere either. My workaround has been to set the sort up in the BAQ, but the the sort goes out the window if someone sorts the grid.

I think you would have to add some code to a customization to do this.

yeah we have a job priority dashboard I created and there are just a bunch of different ways you could look at all of the data to see things based on sales/material/Min/QOH so being able to flip columns and group without collapsing into groups is what I am looking for.

Probably the “right” way to do it would be to implement some code to add to the sort collection. I haven’t done it before, but if you search infragistics stuff, you should find something. You could probably hijack the sort column click and make that add instead of replacing the sort, then you would need a clear sort button.

https://www.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/12611/multiple-column-sort-on-ultrawingrid

The second, more hacky way if you can define all of the ways you would want to sort it ahead of time would be to use Row)Number() windowing function in your BAQ to get a single column that you could sort on. But you wouldn’t be able to create on the fly sorts, and you would have a bunch of extra, ugly columns.

Man it would be amazing to set the HeaderClickAction to SortMulti globally for all gridviews…

1 Like

You could always bring it into Excel and sort it there. I wind up using Excel as a workaround most of the time.