Recent

Author Topic: combobox in a dbgrid column bug?!  (Read 3276 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2259
    • Lazarus and Free Pascal italian community
combobox in a dbgrid column bug?!
« on: December 27, 2013, 07:00:13 pm »
I made a test project to report my problem. Given a combobox in a column in a dbgrid does not auto-populate when the program starts, then everything else works. Who knows how to help me?
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: combobox in a dbgrid column bug?!
« Reply #1 on: December 27, 2013, 09:04:18 pm »
I'm not sure what your question means (what your problem is).
However, you create datasets and populate them with data in your form's OnCreate, but you do not create any indexdefs or indexes. So it not surprising that you cannot find any data with a lookup field, or link the datasets via a foreign key (if that is what you are trying to do).

xinyiman

  • Hero Member
  • *****
  • Posts: 2259
    • Lazarus and Free Pascal italian community
Re: combobox in a dbgrid column bug?!
« Reply #2 on: December 28, 2013, 04:28:26 pm »
I tried adding what you say. Unfortunately it does not solve my problem. That is, when I start the program I want the field NewLookUpField are populated according to the value of the field Id_Chiave. Can you suggest me how should I modify the source to get this? thank you very much
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2259
    • Lazarus and Free Pascal italian community
Re: combobox in a dbgrid column bug?!
« Reply #3 on: December 30, 2013, 04:39:30 pm »
another idea
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018