Zum Hauptinhalt gehen

ComboBox - where is text box?

Kommentare

8 Kommentare

  • Permanently deleted user

    Hi Jeff,

     

     

    I think you're looking for "Display Form" --> Autocomplete box?

     

    This will allow the user to type in values to be searched, and suggestions should come up as the user types.
    0
  • Ryan Kelley

    I don't think is working properly. I am using the Auto Complete Box in the Display Form, but ALL values show up.  When using, if I type in "A", all values starting with A-Z show up. Shouldn't just values starting with "A" be returned? My where clause only removes values that are not null. But, that shouldn't really be a factor.

    Also, when using this, is there a way a user can select more than one record?

    thanks!!

    0
  • Permanently deleted user

    Doesn't the AutoComplete control rely on a query to supply the values?  I would like to add a set of pre-selected buffer distances to the drop-down, but allow the user to override this by typing in a custom value.  

    0
  • Permanently deleted user

    @Jeff -- Sorry for the incorrect documentation. You cannot actually type a value into a combobox -- you are limited to the provided choices. Unfortunately Silverlight as a whole does not even have an autocomplete combobox control (which is what you are looking for) so it would be quite difficult for us to include this in our product. You'll have to use a separate text box that overrides the combobox if a value is entered.

    @Ryan -- If you'd like to provide your WHERE clause we could take a look at it. In general though, this behavior won't happen automatically, but only if you have set up your WHERE clause to behave like this. For example:

    WHERE somefield LIKE '%{0}%'

    Will match any letter you type anywhere in the field text, not just at the start.

    WHERE somefield LIKE '{0}%' 

    Will only match the letter or text if it appears at the beginning of the word. The key is the position and number of wildcards around the replacement token.

     

    0
  • Permanently deleted user

    Thanks, Jonathan.  I will create a separate text box.

    0
  • Ryan Kelley

    I guess I am a bit confused on the query piece of this. I have a form with just an AutoCompleteBox. My where clause is not looking at results from another query or value within the same form, which makes me wonder why I even need a where clause. I would think I would just need a field to specify.

    In any case, my where clause = FIELD IS NOT NULL.  Each value starts with a two letter state code (ie. AK, AZ, AR).  So, if I type in A into the AuotCompleteBox form, I would only hope to get values that at least have A in the value. 

    Anyway, any insight? The help documentation doesn't really say much about how to use this in a form. But, the example graphic is EXACTLY what I am trying to accomplish, assuming the where clause does NOT look like FIELD LIKE 'C%'

    This post has an example Malcom put up, but again, the where clause = SCHLDSCRP LIKE 'B%'

    http://support.geocortex.com/Forums/Thread.aspx?pageid=0&mid=2&ItemID=20&thread=45491&postid=131611

     

    0
  • Permanently deleted user

    Hello,

    The WHERE clause FIELD IS NOT NULL will always return all fields -- it isn't going to put the user entered text string in there automatically. You have to specify where the text the user types will be inserted into the WHERE clause by using the replacement token: {0}.

    This is a special series of characters that tells the software to insert whatever the user typed at this location. So the WHERE clause:

    FIELD LIKE '{0}%' 

    Should do what you want, and return only values that begin with whatever the user typed.

    0
  • Ryan Kelley

    Thank you Jonathan. This works.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.