listbox with 30000 records

Hi everyone,

I need help to make the data load much faster into the listbox.

Is there a way using the native listbox or some component to accomplish this??

maybe loading certain number of rows first time and then load more later when the scroll bar is change.

Thanks.

There was this very powerful (cocoa now) datagridplugin:

http://www.einhugur.com/Html/Grids.html

If I remember correctly, there is almost no limit to the number of lines, because it loads only the visible lines As the scroll.

For pure Xojo code, you can also try my Data-On-Demand ListBox subclass.

http://www.mactechnologies.com/index.php?page=downloads

[quote=34180:@olivier vidal]There was this very powerful (cocoa now) datagridplugin:

http://www.einhugur.com/Html/Grids.html

If I remember correctly, there is almost no limit to the number of lines, because it loads only the visible lines As the scroll.[/quote]

i have the above component. How much changes is there to convert the native listbox to einhugur datagrid?? and what do i need to look out for.

[quote=34181:@Kem Tekinay]For pure Xojo code, you can also try my Data-On-Demand ListBox subclass.

http://www.mactechnologies.com/index.php?page=downloads[/quote]

what do the ‘single user license’ in the register page mean?

A license for a single developer to use in an unlimited number of their apps without further licensing.

No. However, you shouldn’t load more than 50 - 100 rows into a listbox on the web anyhow.

[quote=34181:@Kem Tekinay]For pure Xojo code, you can also try my Data-On-Demand ListBox subclass.

http://www.mactechnologies.com/index.php?page=downloads[/quote]
Nicely done. Thank you for sharing!

Data-On-Demand ListBox subclass look really good. Will adapt to my application and then if it work well, get it from ur website.

I assume i can compile it ??

(Slightly OT, but pertinent) - I can’t use Kem’s DoD list because I’m already committed to my already mass-featured ListBox, but I did do some simple plumbing on it and my ListBox does data on demand too.

DoD is great, because your list speeds up so much faster. I don’t agree withe Beatrix’s number - I think after 1000 is when you should start thinking about DoD.

However, one thing I didn’t anticipate was that any multiselection beyond the visible limits doesn’t work, and then I realized that it would take much more plumbing to accomplish.

Kem, does your DoD handle multiple selection (in and outside the view, with the many ways you can multi-select) seamlessly, and are there any tips you can recommend about it?

Kem, in my application , the listbox i want to replace need to do multiselect with checkbox on the left hand side. Can your DoD do this??

Garth, what is your mass featured listbox look like??

Yes, it does. I maintain a shadow boolean array for the selection.

[quote=34213:@Richard Duke]Data-On-Demand ListBox subclass look really good. Will adapt to my application and then if it work well, get it from ur website.

I assume i can compile it ??[/quote]

Yes, but a standalone app requires a license. There are no limits to using it within the IDE.

I just realized that I have an update sitting on my drive that I should really post. I’ll try to do that today.

oh dear, so i cannot test it out on my client’s server which is very very slow… need to get the license to do that.

My ListBox started with Alex Restrepo’s CustomCellListBox. I then modified it extensively, to allow selectable columns and many other things (like many custom cells). I’m happy to send it out, but I wonder how easy it would be for someone else to use.

The problem I predict with the multiselect is handling all the different ways people can multiselect, for example selecting a row, pressing SHIFT, clicking the scroll downwards (full step), and clicking on another row. This multiselects from the first row selected to the second row selected.

Maye this is easier than I’m thinking, it’s just a little scarier thinking about it… =)

garth, if u don’t mind i would like to have a look at your listbox.

Kem, where is the vertical scrollbar i need for DoD??

based on this statement on your manual.

“If you want a vertical scrollbar, add that to the window and line it up with the ListBox. Because of the nature of the Data-On-Demand ListBox, you cannot use the ListBox’s own vertical scrollbar. Attempting to do so will result in an error.”

Have you tried making the Listbox invisible, populating it, then making it visible again? This makes populating it faster. You can always put a dummy blank Listbox over it to make the UI look OK while it is working.

[quote=34264:@Richard Duke]Kem, where is the vertical scrollbar i need for DoD??

based on this statement on your manual.

“If you want a vertical scrollbar, add that to the window and line it up with the ListBox. Because of the nature of the Data-On-Demand ListBox, you cannot use the ListBox’s own vertical scrollbar. Attempting to do so will result in an error.”[/quote]

You create a standard, vertical scrollbar, then assign it to DOD in the DOD subclass Open event (it’s the only parameter to Open). DOD will manage the ScrollBar after that. In the ScrollBar’s ValueChanged event, you assign the DOD’s ScrollPosition.

This is in the example projects and elsewhere in the manual.

I’ve had more success with this on OSX than Windows, which doesn’t work that well, disappears while it loads the data. if I have a large data set, I almost always just get out the Einhugur StyleGrid, which has Lockdrawing properties. Much smoother for big data sets than the list box, at least on Windows. I like to work with the ListBox where possible, but sometimes that just isn’t practical.