Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7920119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:05:53+00:00 2026-06-03T16:05:53+00:00

My C++ CAD application maintains logs of the user’s modeling operations so that they

  • 0

My C++ CAD application maintains logs of the user’s modeling operations so that they can be unapplied and reapplied. Any particular project may contain just a few operations or it may contain hundreds of thousands of operations. I already have my own data structures in place to manage this data in a way that is memory-efficient, and this has been working well. But now I am adding a feature that allows the user to inspect his operation logs in a grid. (I am using Embarcadero RAD Studio 2010; all GUIs use VCL.)

Currently, I am using a TDBGrid component to show the user the operation data in rows. Here is how I have my components connected up:

TDBGrid.DataSource = a TDataSource

TDataSource.DataSet = a TClientDataSet

TClientDataSet.ProviderName = a TDataSetProvider

TDataSetProvider.DataSet = a ProjectDataSet

A ProjectDataSet is a class I derived from TDataSet.

Because I am pulling the operation data from my own data structures and not from a database, I have overridden the GetFieldData and GetRecord functions (and several others) in my ProjectDataSet class so that it returns the data directly from my own data structures (without doing any database queries). This works.

In order to minimize memory usage when displaying lots of operations, I have set the ‘FetchOnDemand’ property in my TClientDataSet and I have set ‘PacketRecords’ to 100. So, initially only the first 100 operations appear in the grid. Once the user scrolls to the bottom of the grid, the next 100 operations are automatically fetched by the TClientDataSet and displayed in the grid.

All of this works very well. My problem is that as the user scrolls through the grid, the TClientDataSet keeps on fetching more and more records without ever releasing any. So, if the user scrolls down far enough in a very large project, I eventually run out of memory.

So, my question is: what is the best way to make this GUI work? Essentially, I want the grid to behave like a spreadsheet. I want the user to be able to scroll up and down through the operation list (or jump to a specific row), regardless of how many operations there are, and I don’t want the GUI components keeping a lot of stuff in memory that the user doesn’t imminently need.

I’m assuming that the TDBGrid (or some other VCL component) is designed to be capable of displaying arbitrarily large datasets by fetching only a few records at a time, so how is it meant to be done?

If I need to rethink the GUI, that’s fine. But it would be really nice if I could use the same GUI to display 10-operation projects or 100,000-operation projects.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:05:54+00:00Added an answer on June 3, 2026 at 4:05 pm

    Try VirtualTreeView its a Delphi component but it does work in C++ Builder. You will have to port you data fill function to the new grid.

    VT is very speedy and very easy to use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application (cad like editor) in which the user may place a
I have a need to create a Web Application that can interact with 3D
What should I name my class that stores costs/prices/amounts of money in CAD/USD as
I am developing a CAD application using Delphi2010 and OpenGL. Currently, i am working
I have an application loading CAD data (Custom format), either from the local filesystem
I've coded a C# executable that uses xcopy (cmd.exe /Q /D /C xcopy C:\_Depot\Tools\CAD\2009
I am working on importing an 3D CAD model into my iOS application, but
How can I create a dump of an application on widows phone , in
I'm developing CAD like application in C# (Forms, no external framework). I have implemented
My next project is a kitchen designer application (CAD). Something like MS Visio or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.