Re: Is there an alternative to a combobox for selecting -- VB2005?



Check into using a DataView on the Dataset. You can set the RowFilter
property to something like "CompName LIKE '" & ComboBox.Text.ToString & "*'"
Since you said that the dataset is populated very quickly this will give you
a subset of the DataTable without having to go back to the server. It will
only show you a portion of the DataTable. If you put this in the TextChanged
event the DataView will be refreshed with each letter even if the user
deletes a letter or something like that.

"jeff" wrote:


if you do this ... be careful not to create a lot of round trips to the
server...or a delay between the user entering a letter...

person enters SIM ...
delay after S to retrieve data and populate the combo box...
delay after I to retrieve data and populate the combo box... do not need to
retrieve ...S will have already populated cb with necessary records...
delay after M to retrieve data and populate the combo box ... do not need
this retrieve ... S will have already populated cb with necessary records...

person, clicks on the S and deletes it ... so ... not they have IM
delay ... combo box needs to retrieve and populate list...
user deletes M ... delay ... combo box needs to retrieve and populate
list...

you see where this is going ... you will be causing delay for the user and
you will have alot of round trips to the server.

plus, you will have to capture if the first letter the user entered has
changed ... causing your list to 'refilter'

The round trips are easy ... retrieve all the data for the list and cache it
in-memory...

The time will be 'purging the combo list' and 'refilling it'... this will
cause a delay ... the user will be typing and will not see anything...until
your have populated, purged, populated, purged, populated the combo box
value list.

I would recommend a timer event ... wait for a delay ... popup window ...
that 'looks' like a combo box.


Jeff.

"Rich" <Rich@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2242428B-6BF4-429E-9113-D5D58A781E6A@xxxxxxxxxxxxxxxx
Thank you all for your replies. I did think about the subset idea. The
issue is with the Autocomplete feature. My users don't scroll. They let
the
name autocomplete. I can achieve the autocomplete feature nicely if I
pull
all 30,000 names. My main thing was to check first to make sure I am not
going to reinvent the wheel by coming up with another solution I had in
mind.
So it looks like implementing my other solution might not be reinventing
the
wheel.

The user types a letter. On the key up stroke I pull data from the server
for all names that start with that letter and set the combobox datasource
to
that list and then do the drop down thing. Well, I will give something
like
that a try.

Thanks again all for your replies.

Rich

"Rich" wrote:

Greetings,

I have to load 30,000 unique names into a combox. Filling a dataTable
takes
only a few milliseconds. But populating the combobox and displaying the
list
takes several seconds - way too long. A user selects a name from the
combobox and runs a query.

Originally, this combox was on a form in an MS Access ADP which was
linked
directly to our sql server. The combobox populated withins millisecnods.
How can I achieve this kind of performance in my VB2005 app? what is the
bottle neck here?

Thanks,
Rich



.



Relevant Pages

  • Re: Is there an alternative to a combobox for selecting -- VB2005?
    ... delay after S to retrieve data and populate the combo box... ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Navigation services popup menu
    ... > Now I can see how to populate the popup menu in NavPutFile, ... > can't see is how to retrieve the user's choice of filetype after the OK ...
    (comp.sys.mac.programmer.help)
  • populating list box with contacts
    ... I am trying to populate a list box in excel with the FirstName object of my ... then when the user selects a FirstName, I retrieve ... Prev by Date: ...
    (microsoft.public.excel.programming)
  • Re: Roles and Memberships
    ... I need to retrieve only users and there information in the aspnet_Membership ... table that are associated with certain roles and then populate a GridView ... Peter Kellner ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: ASP.Net [2.0] - Converting a date to a new format...
    ... a bit poor)...you might wanna paste this into VS to make it reformat a bit ... GetUser functions below). ... I then populate my session variables accordingly; ... Delay because of frozen roads ...
    (microsoft.public.dotnet.framework.aspnet)