Gabriel Fabrega Posted May 3, 2018 Share Posted May 3, 2018 Hello guys! I have a UniDBGrid with some columns with the "Sortable" property enabled and the "OnColumnSort" event scheduled. Basically, I enter the field in the "IndexFieldName" property of TADQuery. However, I need to clear this order ... Return to the original sort order, which is in the SQL query. Even closing and opening the query and clearing the property "IndexFieldName", prevails the ordering of the column that was clicked. How to clear the ordering of the UniDBGrid columns? Sorry for English. I'm brazilian. Thank you! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 4, 2018 Share Posted May 4, 2018 Hi, Which edition and build are you using? Quote Link to comment Share on other sites More sharing options...
Gabriel Fabrega Posted May 4, 2018 Author Share Posted May 4, 2018 Hi Delphi Developer 1.0.0.1424 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 4, 2018 Share Posted May 4, 2018 Hi, Trial edition or ? Quote Link to comment Share on other sites More sharing options...
Gabriel Fabrega Posted May 4, 2018 Author Share Posted May 4, 2018 I have an official license Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 4, 2018 Share Posted May 4, 2018 First of all please visit here: http://forums.unigui.com/index.php?/topic/6291-new-users-please-adjust-your-forum-email-address/ Quote Link to comment Share on other sites More sharing options...
Gabriel Fabrega Posted May 4, 2018 Author Share Posted May 4, 2018 Sorry. I already adjusted. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 4, 2018 Share Posted May 4, 2018 One possible solution maybe: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniDBGrid1.JSInterface.JSCall('store.sorters.clear', []); //UniDBGrid1.JSInterface.JSCall('view.refresh', []); GridDataSet.Close; ... GridDataSet.Open; end; Quote Link to comment Share on other sites More sharing options...
Gabriel Fabrega Posted May 4, 2018 Author Share Posted May 4, 2018 Worked perfectly. Thank you! 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.