By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,089 Members | 1,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,089 IT Pros & Developers. It's quick & easy.

RougeWave ObjectiveGrid - storing rows of virtual grids

P: n/a

I'm using ObjectiveGrid with C++ and I tried to understand the concept
of virtual grids. I created a sample application that read table
entries using GetStyleRowCol from an external source file, this worked
fine. Then I wanted to enable saving of changes. So I overloaded the
StoreStyleRowCol function to save the changed cell values back to the

But this is not a reasonable behavior. This way I can only make
changes that are directly stored to the file. It is not possible to
undo changes, or discard any changes.

What I want is a behavior similar to applications like Excel: Open a
file, change some values, undo some changes. And when I exit the
application or close the file the application asks if I want to save
the file or discard the changes.

One way to realize the second requirement (ask if I should save or
not) I figured out is to make a copy of the file when loading it. Then
I work on this copy. If I close the file the program asks if I want to
save. If I do the copy is renamed to the original file name, if not it
is deleted.

This is a possible way for small files, but when I want to edit files
of size larger than some GB this is not possible anymore.

Is there a better solution? One way I think of is to store any change
in some internal data structure. Each call of StoreStyleRowCol adds
one entry in this structure. GetStyleRowCol queries this structure to
get the latest version of the data set. With this structure I can
realize a undo mechanism. But the disadvantages I see are 1.) only
limited number of changes possible (what if I change any cell of a
dataset with some billion records and many fields?) and 2.) quite
complicated to implement.

Does anyone know a better approach to implement virtual grids that
allows saving only on demand (and not each time a cell is changed) and
undoing changes?

CU, Torsten
Jul 22 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.