There are more than 100,000 entries in the database and when I call the tableview.ViewData.Expand(True) method, the program goes to the "application not responding" status.

And the idea came to try in the method tableview.ViewData.Expand(True) send a cycle of 1000 records and expand those detail level records that are in the range of these records. and so on until the last entry!

  • And what is your question? - Kromster
  • one
    Are you sure that there are people in nature who may really need to see all 100,000 entries on the screen? - Yaant
  • @KromStern how to send 1000 entries in expand () - djoni
  • @Yaant there is data filtering! But it is necessary, that would be - djoni
  • I understand correctly that the "upper level" contains data calculated on the basis of nested? And this data is calculated after loading all the records? - kami

1 answer 1

There are actually only 2 outputs:

  1. lazy-loading nodes, i.e. there is actually no data until the user opens the node (as advised by @karmi).
  2. See how this expand works, and use hacks to override it with your method, with the addition of a deptht parameter that will limit the depth of the recursion. At the same time implement without blocking the UI, i.e. tugging ProcessMessages.

And limiting the output to n records does not make sense, you open the node, and you need to show it all. But Encand the whole root to how many there are hundreds of thousands of entries, this is not an option at all.