Results 1 to 4 of 4

Thread: multi combobox values

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2010
    Posts
    89

    multi combobox values

    Hi,

    i have a combobox and wish to assign multiple values if possible,

    eg is i select WESTERN EUROPE i would like the values to be: western europe OR western-europe AND Generic

    as the combobox is used to search for these strings within a listview (which is working fine for the combobox1.text but the listview sometimes has "western Europe" as "western-europe" and does not find it.

    thanks in advance

    btw, the AND value is not necessary if not possible, would be nice though.
    Last edited by vistar86; Aug 1st, 2010 at 03:01 PM.

  2. #2
    Fanatic Member
    Join Date
    Jun 2008
    Location
    Portland, OR, USA
    Posts
    659

    Re: multi combobox values

    Can you post the code you are using to filer your list view? And populate the combo box?

    I am not sure I completely understand, but it looks to me like there might be better ways to accomplish what you are trying to do . . .

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2010
    Posts
    89

    Thumbs up Re: multi combobox values

    hey thanks for helping again

    i figured something out, so its kinds solved.

    The way i did it was, i have the original combobox1.text as a string and i also split the string using .split function, both the words "western" and "europe"
    then rejoined them with a "-" between, which made the new formatted string to play with, and of course the original

    thanks
    Last edited by vistar86; Aug 1st, 2010 at 04:49 PM.

  4. #4
    Fanatic Member
    Join Date
    Jun 2008
    Location
    Portland, OR, USA
    Posts
    659

    Re: multi combobox values

    Well, if you solved it, congrats.

    Some points to consider anyway:

    Often it is the case that searches like this need some tuning to accomodate variances in data-entry and such.

    A. If the listview is being populated from you OWN database (or at least, one over which you have some control) then you owe it to yourself and your users to implement some front-end validation to minimize things such as you describe (Western Europe vs. Western-Europe). Consistent data on the back side is a great first step to ease of retreival!

    B. Again, I am not familiar with where the ListView Data is coming from. However, any time you end up with multiple variations on something like "Wester Europe", you might consider examining your Database structure (if you have this option . . .). It seems to me that where ever your listview data is coming from should have a table of "Regions" or whatever. Both your Combo-box filter selection and your source data could draw from that.

    Anyway, good luck . . .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width