Kast2k Posted May 18, 2020 Posted May 18, 2020 Dear colleagues, I received a request about addition of multi columns sorting in grid. In demo GridGroupingSorting i found that it is possible. But, as i see when you are clicking on any sortable column then Columns: TUniDBGridColumnArr and Directions: TUniSortDirections always have length of 1, so generated SQL row will always produce sorting by single field. Is it bug or feature or may be MultiColumnSort logic is other? Grouping.Enabled was set to false; Quote
Sherzod Posted May 18, 2020 Posted May 18, 2020 1 hour ago, Kast2k said: Columns: TUniDBGridColumnArr and Directions: TUniSortDirections always have length of 1 Hello, Are you sure? Quote
Kast2k Posted May 18, 2020 Author Posted May 18, 2020 Yes, take a look on video. Sources attached. bandicam 2020-05-18 13-10-51-887.mp4 GridGroupingSorting.zip Quote
Kast2k Posted May 18, 2020 Author Posted May 18, 2020 The target is to received something like "select * from [Customers] order by [ContactTitle] ASC, [Region] DESC" if i'm understanding right Multi Column sorting Quote
Sherzod Posted May 18, 2020 Posted May 18, 2020 Can you test with this config?: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniDBGrid1.JSInterface.JSConfig('multiColumnSort', [True]); ... end; Quote
Kast2k Posted May 18, 2020 Author Posted May 18, 2020 Thanks, Sherzod, But sorting is not working OK, it's not following the click order. Video: bandicam 2020-05-18 13-59-55-242.mp4 Quote
Administrators Farshad Mohajeri Posted May 19, 2020 Administrators Posted May 19, 2020 Problem here is that sort fields come in reversed order. This will be fixed in next build. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.