Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Async refreshing data table plug-in
#1
Question 
Hello,
I am using a data table plug-in from DataTables in my IW app.
I would like to call the reload method inside a TIWButton async click event.

Now I wrote the following code which work fine in non async event:

  FOrder.ExcludeShippingCost := not FOrder.ExcludeShippingCost;
  if (FOrder.ExcludeShippingCost) then
    EXCLUDESHIPPINGCOSTBUTTON.Caption := 'Add shipping'
  else
    EXCLUDESHIPPINGCOSTBUTTON.Caption := 'Remove shipping';
  WebApplication.CallBackResponse..AddJavaScriptToExecute('$(''#' + FDataTableId + ''').DataTable().ajax.reload();');


In async event the above code don't work (probably cause the event is already async).
How can I call the javascript function in async click event?

Thank you,
Davide
Reply


Messages In This Thread
Async refreshing data table plug-in - by David1 - 11-23-2023, 03:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)