Kast2k Posted May 18, 2020 Share 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 Link to comment Share on other sites More sharing options...
Sherzod Posted May 18, 2020 Share Posted May 18, 2020 1 hour ago, Kast2k said: Columns: TUniDBGridColumnArr and Directions: TUniSortDirections always have length of 1 Hello, Are you sure? Quote Link to comment Share on other sites More sharing options...
Kast2k Posted May 18, 2020 Author Share Posted May 18, 2020 Yes, take a look on video. Sources attached. bandicam 2020-05-18 13-10-51-887.mp4 GridGroupingSorting.zip Quote Link to comment Share on other sites More sharing options...
Kast2k Posted May 18, 2020 Author Share 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 Link to comment Share on other sites More sharing options...
Sherzod Posted May 18, 2020 Share Posted May 18, 2020 Can you test with this config?: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniDBGrid1.JSInterface.JSConfig('multiColumnSort', [True]); ... end; Quote Link to comment Share on other sites More sharing options...
Kast2k Posted May 18, 2020 Author Share 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 Link to comment Share on other sites More sharing options...
Sherzod Posted May 18, 2020 Share Posted May 18, 2020 OK, We will check it. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 19, 2020 Administrators Share Posted May 19, 2020 Problem here is that sort fields come in reversed order. This will be fixed in next build. Quote Link to comment Share on other sites More sharing options...
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.