Recent

Author Topic: SQLite and DBGrid, when updated DataSet grid displays nothing  (Read 3656 times)

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
SQLite and DBGrid, when updated DataSet grid displays nothing
« 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?

Soner

  • Sr. Member
  • ****
  • Posts: 305
Re: SQLite and DBGrid, when updated DataSet grid displays nothing
« Reply #1 on: December 24, 2018, 04:56:52 pm »
Try this:



Dataset.disablecotrols;
Try

   //... Download, import

finally
 Dataset.EnableControls;
End;

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: SQLite and DBGrid, when updated DataSet grid displays nothing
« Reply #2 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