Topic: dbItemID / dbIndexToID()

Hello all,


Just a quick question : I am not sure that I fully understand the difference between dbItemID and dbIndexToID() properties that we find attached to TableGrids and Comboboxes.


Can someone give me a quick overview on both ? I usually use dbItemID to find the id of a table record when selecting a row in a tablegrid. Am I doing wrong ?


Cheers



Mathias

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor

Re: dbItemID / dbIndexToID()

Hello.


dbItemID return id of selected row, but what if you want to know id not selected row?
You should use method dbIndexToID()


Example, if you want to know id of first and second rows

id := Form1.TableGrid1.dbIndexToID(0);
id := Form1.TableGrid1.dbIndexToID(1);
Dmitry.

Re: dbItemID / dbIndexToID()

Clever !!


Thanks for the clarification


Cheers



Mathias

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor