Posted 8 September 2017, 2:14 pm EST
First thank you so very much for your time and expertise.
On my spreadsheet I have
implemented a custom data model by creating a new class and inheriting from
DefaultSheetDataModel. I then override
the function GetValue which gets data from my database. When I run my application, the spreadsheet is
“initially” populated and everything appears to work just fine.
However, after changing a
single cell’s value to something else, I redisplay the spreadsheet. The GetValue method is implicitly called and
the data that is retrieved is from the database thus overwriting the change I
just made to the cell.
My first guess at a new algorithm
is: the first time in the GetValue
method should retrieve data from the database and every subsequent time, it
should retrieve data from the spreadsheet.
After implementing this algorithm the GetValue method now is trying to
access the cell’s value, which in turn implicitly calls the GetValue method and
I immediately run into an infinite loop!?
What is the proper design to
solve this kind of problem? If this is
the proper design, how do I get the GetValue method to return a value from a
cell without going into some recursive call?
Again, thank you for your time.