Author Topic: How can I use a DBGrid Pick List  (Read 4406 times)


  • New Member
  • *
  • Posts: 35
How can I use a DBGrid Pick List
« on: March 20, 2015, 09:24:37 pm »
This newbie needs some help.  I have a DBgrid attached to a table with five fields.  I populate the Pick List of column 1 with this code:


I am trying to implement the following behavior.  When the user selects an item from the Pick List to fill in the cell, I want to trigger a procedure to fill in the remaining cells in the row based on the selected value in column 1.  My problem is I cannot find any events in the Object Inspector that are tied to the Pick List.  I was looking for something like "OnSelect", "OnEditingDone", or "OnCloseUp". 

Is there a better way to implement the behavior I looking for?  Any help with example code will be greatly appreciated.
Windows 10, Lazarus 2.0.6, FPC 3.0.4


  • Hero Member
  • *****
  • Posts: 1251
Re: How can I use a DBGrid Pick List
« Reply #1 on: March 20, 2015, 10:04:59 pm »
Suspect you'll find what you're after on this page...

I also remember seeing a decent grid demo that shipped with Lazarus (Projects - Close.  In the resulting dialog, click on Examples I think it is, then search for grid).

Finally, this question has been asked before.  Click on the search icon in the top right.  Type "grid picklist" and hit return.  There may be useful code in one of the other answers :-)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:
  BOOKS! (Free and otherwise):


TinyPortal © 2005-2018