Lazarus

Free Pascal => Database => Topic started by: lainz on December 21, 2018, 11:33:06 pm

Title: SQLite and DBGrid, when updated DataSet grid displays nothing
Post by: lainz on December 21, 2018, 11:33:06 pm
Hi, I have a DBGrid with a DataSource and a DataSet, the normal setup. It's displayed correctly until my application downloads from an API an update to the table in the DataSet and reloads it. The grid is not functional anymore.

Is strange because I have another DBGrid and is working fine. Someone had this problem before, I readed this: https://forum.lazarus.freepascal.org/index.php?topic=40899.0

But did not help me at all.

Any setting, any special case when this is not working?
Title: Re: SQLite and DBGrid, when updated DataSet grid displays nothing
Post by: Soner on December 24, 2018, 04:56:52 pm
Try this:



Dataset.disablecotrols;
Try

   //... Download, import

finally
 Dataset.EnableControls;
End;
Title: Re: SQLite and DBGrid, when updated DataSet grid displays nothing
Post by: lainz on December 26, 2018, 11:56:15 pm
Thanks. Unfortunately our code already uses that technique with the bad result I described.
TinyPortal © 2005-2018