[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Huge table, records, scrolling, etc.
|
Hello,
I have a problem may other developers also have, but I did'nt find any
resonable solution yet.
My problem is I want to use SWT to show a table with many records to the
user.
Lets say I want to show 1.000.000 records, normally (on less recors) I can
load all records into table items and then I can show them.
But 1.000.000 records take a very long time to read from database, so there
must be another solution.
I read something about virtual tables and the propety SWT.SetData. But with
this I am not that familiar.
I suggest do do it like follows:
I only read as many records from database as fit on the screen, lets say
this are 25. Only if the cursor moves closer to the 25th record the next 25
records are preloaded and ready to show.
My 1st problem with this is, how can I make the scrollbar believe there are
1.000.000 records instead of 25? So the slider must be as small as 1.000.000
records instead of 25 records.
My 2nd problem is, which trigger / listener I should use to detect/trigger
the preloading of the next 25 records? I must trigger if the user uses the
keyboard to move down/up and/or if a user uses the scrollbar.
I believe there are standard solutions available, but sorry I could not
find.
Any help would be appreciated, thanks a lot!