Topic
2 replies Latest Post - ‏2011-12-09T07:34:26Z by aryan_raj
aryan_raj
aryan_raj
67 Posts
ACCEPTED ANSWER

Pinned topic Ajax Type-Ahead

‏2011-12-08T18:01:40Z |
Hi All,

I am new to wpf, was trying to use the ajax type-ahead, gave some comma separated values in the Values input.
It is working fine, but if there is only one matching record with the text that I type in the text box, the suggestion/matching word is taking lot of space (snapshot attached).

In the picker options, the picker type is set to "select list", not really sure about the other two options - table, custom.
Updated on 2011-12-09T07:34:26Z at 2011-12-09T07:34:26Z by aryan_raj
  • kevintap
    kevintap
    111 Posts
    ACCEPTED ANSWER

    Re: Ajax Type-Ahead

    ‏2011-12-08T23:31:02Z  in response to aryan_raj
    This looks like this might be a bug in the Ajax Type Ahead builder. The javascript that the builder uses to display the matching records uses slightly different logic when there are multiple matches versus a single match. In the case of a single match, the match is displayed using a read-only text input field. This text input field has its size attribute (with a unit of text characters) set based on the size attribute of the type ahead input field. If the type ahead input field doesn't have a size specified, then the script uses the pixel size of the type ahead input field, which is incorrect (since the units here are pixels and we're assigning to the size attribute which is expecting characters). This results in the very long text box as you've posted in your screenshot.

    The work-around is to specify an explicit size for your type ahead text input. You can do this using a variety of builders, the Attribute Setter might be the easiest to use, or if your text input is being defined using a Text Input builder, you could just use that.
    • aryan_raj
      aryan_raj
      67 Posts
      ACCEPTED ANSWER

      Re: Ajax Type-Ahead

      ‏2011-12-09T07:34:26Z  in response to kevintap
      Thanks Kevin, working as expected after setting the size.