[ACCEPTED]-Counting the rows in a TDbGrid-datagrid
VisibleRowCount are protected properties in
TCustomGrid that 3 are not exposed in
TDBGrid. But you can get round 2 that doing the following:
type TDummyGrid = class(TDBGrid); RowCount := TDummyGrid(MyDBGrid).RowCount; VisibleRowCount := TDummyGrid(MyDBGrid).VisibleRowCount;
Be warned that 1 this includes the header.
You could try:
Maybe there are better solutions. But 1 this worked for me.
I would use
More Related questions