Tinygoldwing Posted November 22, 2023 Share Posted November 22, 2023 User clicks to export grid they are presented with a list of column title from the grid. They can check or uncheck the ones they want to export. They choose them and I set the remainder of the fields visible to false. So far so good. Works great. However I can't determine when the exporter has completed to reset the columns visible property back. I tried a bunch of ways to including setting a timer but that's a fixed value and no one would want to wait seconds to do this even though it finished seconds earlier. Thank you for the help. Ed Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 22, 2023 Share Posted November 22, 2023 Hello, I will try to check. Quote Link to comment Share on other sites More sharing options...
Tinygoldwing Posted December 4, 2023 Author Share Posted December 4, 2023 Where you able to find anything any solution? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 5, 2023 Share Posted December 5, 2023 10 hours ago, Tinygoldwing said: Where you able to find anything any solution? Yes, today I will try to give you a solution. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 5, 2023 Share Posted December 5, 2023 13 hours ago, Tinygoldwing said: Where you able to find anything any solution? Hello, Solution for now (with some practical benefit): 1. Form OnCreate event -> procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniDBGrid1.JSInterface do begin JSAddListener('beforedocumentsave', 'function(sender, params){ajaxRequest(sender, "_beforedocumentsave", {}, false)}'); JSAddListener('documentsave', 'function(sender, params){ajaxRequest(sender, "_documentsave", {})}'); end; end; 2. UniDBGrid OnAjaxEvent -> procedure TMainForm.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_beforedocumentsave' then begin UniButton1.Enabled := False; end else if EventName = '_documentsave' then begin UniButton1.Enabled := True; end; end; 1 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.