Hello again.
In my little spreadsheet application I am applying a filter to the data to be visible in sWorksheetGrid1.
To test that I made a little code like this:
Form2:=TForm2.Create(Nil);
Form2.ShowModal;
If (Form2.ComboBox1.ItemIndex<0) OR (Form2.Edit1.Text='') then exit;
case Form2.ComboBox1.ItemIndex of
0: Begin { Prj }
Krit:=StrToInt(Form2.Edit1.Text);
For n:=1 to GetLastRow(InSh) do
begin
Value:=InSh.ReadAsNumber(n,Prj);
if (Value=Krit) then Form1.sWorksheetGrid1.ShowRow(n)
else Form1.sWorksheetGrid1.HideRow(n);
end;
end;
1: begin showmessage('1') end;
2: begin showmessage('2') end;
otherwise
showmessage('Error');
end;
Form2.Free;
Basically it works. At least first time - but when I operate a second time with another criterium (Krit variable) the row height seems to collapse as can be seen in attached png. If I save the workbook I can see that all the data is there and the rows not matching the criteria are hidden. All as supposed.
So I assume that it is a presentation/WorksheetGrid issue.
Any help in solving this is appreciated.