Recent

Author Topic: dbgrid picklist detect when item changed or item in list is clicked  (Read 509 times)

tdb

  • New Member
  • *
  • Posts: 28
As per the title in a dbgrid picklist how can I detect when item changed or item in list is clicked.

Simple task is to display a list of items when the user selects an item from the list then I need to look up the id in a table and display the descriptions etc.
Note I can do this when the column is Exited but I need to do every time a new items is select (column and row stay the same).

I tried to use on EditingDone but the value retrieved is the old value not the new - Anyway to get the new value?

cdbc

  • Hero Member
  • *****
  • Posts: 1953
    • http://www.cdbc.dk
Re: dbgrid picklist detect when item changed or item in list is clicked
« Reply #1 on: February 10, 2025, 08:43:31 am »
OnChange?!?
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 3.6 up until Jan 2024 from then on it's both above &: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 4.99

tdb

  • New Member
  • *
  • Posts: 28
Re: dbgrid picklist detect when item changed or item in list is clicked
« Reply #2 on: February 11, 2025, 02:47:41 am »
Than
OnChange?!?

Thanks for the reply - I think onchange only happens after the picklist item is committed to the database.
What I need is an event that occurs after the user clicks their selection from the picklist.

On EditingDone will do what I want - Just needed so code to read the item selected from the editor - all working now.

 

TinyPortal © 2005-2018