I've discovered that the vertical position of a grid's record can be obtained in this way:
The grid view has the property ViewData.Rows
. Rows
is an array and each element of it has the RecordIndex
property. So you can iterate over the Rows
array and test if its RecordIndex
is which the one you are finding and, if true, get the property ViewInfo.ClientBounds.Top
.
Example:
for i := 0 to gdMovimentoTV.ViewData.RowCount - 1 do
if gdMovimentoTV.ViewData.Rows[i].RecordIndex = iSomeRecordIndex then begin
if Assigned(gdMovimentoTV.ViewData.Rows[i].ViewInfo) then begin
Result := gdMovimentoTV.ViewData.Rows[i].ViewInfo.ClientBounds.Top;
Break;
end;