FAIL. VisibleRowCount returns 1 when 0 is visible!

Hi.


Being new to TAdvStringGrid (coming from devex....) .. I really like the idea of having an empty grid.
That is - only the fixed row as header visible (not using fixed col).

Setting rowcount to 1 - fixedrows to 1 gives the visible correct look. (remember to tick the FixedRowAlways)

When tabbing into the grid I would like to insert a row - if the grid is empty - and start editing it.
So I try this:

procedure TForm1.asgGridEnter(Sender: TObject);
begin
  if asgGrid.VisibleRowCount = 0 then
    asgGrid.AddRow;
end;
But the visibleRowCount tells me that 1 row is visible ???
How can that be correct?

Kind Regards.
Bjarne Rasmussen

PS : An example which shows Master/Detail with 2 or more grids and filtering, would be much appreciated.

If you have a fixed row, why not simply perform a check:


if grid.RowCount = 1  then  grid.AddRow?

That is a working solution - thx for that easy workaround.

Still - I believe that its an error in the grid design.
VisibleRowCount is 1 when there is 0 or 1 record visible ... not what is described in docs.

This is by design, based on the base class TStringGrid where this functionality is defined.