I have a grid that may contain anywhere from a few dozen up to 1 million rows. To improve performance I am of course using GetDisplText to speed up the display of cells and everything is fine. The difficulty is that I want to add nodes that can span many rows. Adding the node with AddNode is a quick operation but contracting a node with many rows is extremely slow. Is there anything I can do to expand/contract large groups of rows? I suspect that the underlying issue is the speed of hiding rows and that maybe I need to take some approach other than the built-in node feature to achieve a node-like effect that can handle large spans. Do you have any thoughts on how to solve this?
I have some insight into this. The speed of expanding and contracting nodes with large numbers of rows is reasonably fast if I expand or contract them in code using ContractAll and ExpandAll, provided that I wrap them in BeginUpdate and EndUpdate. The slowness comes in when expanding/contract by clicking the node indicator (the +) in the grid. Does this mean that you could modify the code behind the node indicator so that it also is wrapped in BeginUpdate and EndUpdate? Alternatively, is there any easy way for me to override the event that gets triggered when the node indicator is clicked?
- Did you try to use OnContractNode & OnExpandNode?2) For expanding/collapsing a single row in the grid with clicking the column header, I cannot see an issue here. Do you see this in any of our dems?
To reprodoce:
ContractAll is doing some optimizations and can do these because it is known in advance all rows within node span will be hidden. This optimization is not possible when doing a single node collapse in random order. We'll look if we can nevertheless improve performance for very large chunks of rows like in this case.
Bruno,
With respect to timing, we are now very busy with the next TMS Component Pack & TMS Pack for FireMonkey release for later this month, early next month and after this release, we can again allocate time for this.