Recent

Author Topic: DBGrid is empty in runtime  (Read 218 times)

alain.janquart

  • Newbie
  • Posts: 1
DBGrid is empty in runtime
« on: September 14, 2020, 11:37:33 am »
Hello,

I'm created a form with a DBgrid. In my datamodule I created the needed Connection (TZConnection), Query (TZReadOnlyQuery) and Datasource (TDataSource) to fill my DBgrid.
When I enable my datasource in designtime, I see the data in the grid. So far so good.
But when running the program, I just see an empty grid.

Any idea what is going wrong here?

Thanks

Lainkes

egsuh

  • Sr. Member
  • ****
  • Posts: 465
Re: DBGrid is empty in runtime
« Reply #1 on: September 17, 2020, 06:54:05 am »
Datasource.enabled does not operate as expected when set programmatically. Set it enabled at design time, and run the program. Then you may open/close Dataset or set TDBGrid visible or not.

 

TinyPortal © 2005-2018