I'm populating a tree from a database with hierarchical data that would require very complex queries if I was to do it in one step, so I do it in two steps: first one I'm filling the data, and second one I'm deleting those rows that don't have children because of my filtering options. So far so good.
The problem is that in some cases after deleting rows, the vertical scrollbar (and scrolling - mouse or keyboard) is disabled though I have rows that go below the bottom of the current visible "page". My code is nothing fancy:
grd.BeginUpdate; for i1 := grd.RowCount - 1 downto 0 do if grd.GetLevel(i1) < 2 then if not grd.Row[i1].HasChildren then grd.DeleteRow(i1); grd.EndUpdate;
Do you have any idea on how to fix it ?
Thanks.










