TTIWAdvWebGrid - how to reload data on async events?

Is there a way to reload data in the TTIWAdvWebGrid asynchonously?

i connect to the DB (Oracle) on my UserSession, then fill the data in the grid.
on form create or on button click etc. it works fine, but on async events such as change the date in a TIWEdit (OnAsyncInput Event) this does not work.

can you please help? here is the code:

try
  ASession.Connect;
  AQuery.Active := True;

  AGrid.ClearCells;

  if AQuery.RecordCount > 0 then
  begin
    AQuery.First;
    AGrid.RowCount  := AQuery.RecordCount; 
    AGrid.TotalRows := AQuery.RecordCount;
    iRowIndex := 0;

    while not AQuery.eof do
    begin

      AGrid.Cells[1, iRowIndex] := AQuery.FieldByName('Data1').AsString;
      AGrid.Cells[2, iRowIndex] := AQuery.FieldByName('Data2').AsString;

      Inc(iRowIndex);
      AQuery.Next;
    end;

  end;
finally
  ASession.Disconnect;
end;

Please make sure to call AsyncUpdateAllCells after updating cell values to reload the grid data asynchronously.

Example:
AGrid.AsyncUpdateAllCells;

To help ensure you receive a quicker response, we recommend posting in the appropriate group related to your query. This way, the experts and community members best suited to address your question can see it and provide assistance more promptly.

Thank you for your understanding!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.