browse data without scrolling
Posted: Thu 04 Oct 2007 14:42
Hi, I'm already long time fighting with an problem and haven't found a good solution yet, perhaps have you an idea?
simple scenario:
user is editing data in grid (appending new rows, deleting records, etc.) and the system on-line updates statistics about all inserted data - sums, averages, ... many things. the dataset is in cached updates mode.
now the problem:
the user appended a row and the dataset is in dsInsert mode. he changed a value and the system needs to update its statistics immediately - look at all inserted data in order first -> last and do some computations. How could this be done?
1. solution like:
d.getbookmark;
d.Post;
d.First;
while not d.EOF do
d.next;
end;
d.gotobookmark;
is crazy, because:
a. post ist perhaps not possible - all required fields are not filled yet.
b. the worst thing for me - the record loses its dsinsert state and gets into dsBrowse (or dsEdit)...
2. solution like:
storing the data duplicately in an array or list don't like at all because of the need of really good working synchronization, that i am really aware of... I hate duplicating data.
could someone give me a tip? something like an alternative read-only pointer to the same dataset?
Thanks very much.
Ludek.
last remark - there are not many records in the dataset, typically 10 or 20, sometimes 100.
simple scenario:
user is editing data in grid (appending new rows, deleting records, etc.) and the system on-line updates statistics about all inserted data - sums, averages, ... many things. the dataset is in cached updates mode.
now the problem:
the user appended a row and the dataset is in dsInsert mode. he changed a value and the system needs to update its statistics immediately - look at all inserted data in order first -> last and do some computations. How could this be done?
1. solution like:
d.getbookmark;
d.Post;
d.First;
while not d.EOF do
d.next;
end;
d.gotobookmark;
is crazy, because:
a. post ist perhaps not possible - all required fields are not filled yet.
b. the worst thing for me - the record loses its dsinsert state and gets into dsBrowse (or dsEdit)...
2. solution like:
storing the data duplicately in an array or list don't like at all because of the need of really good working synchronization, that i am really aware of... I hate duplicating data.
could someone give me a tip? something like an alternative read-only pointer to the same dataset?
Thanks very much.
Ludek.
last remark - there are not many records in the dataset, typically 10 or 20, sometimes 100.