...Determine Row number in TDBGrid?
Author: fduron
{
I did not found property to know the rownumber of a TDBGrid,
so I will try this in the OnDrawColumnCell of a DBGrid:
}
procedure TformX.DBGridXDrawColumnCell(Sender: TObject; const
Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
RowNo : Integer;
begin
RowNo := Rect.Bottom div TStringGrid(DBGridX).DefaultRowHeight
//so, RowNo has the Row to be draw in the moment
...
end;
printed from
www.swissdelphicenter.ch
developers knowledge base