View Full Version : Trouble with the humble combobox. Need to modify, but how?

4 Mar 2011, 2:50 PM
Pretty stumped here, and I could use some help.

Using a combobox ( or something like it, ) I'm trying to create a way for the user to search through and select an element of data by name, and save it's ID to an editorgrid. I've already dealt with the absurdity of the valueField vs displayField in an editorgrid thing; a native solution for which is *sorely* needed...

but there's a twist.

In my data, there may be values with duplicate names, but other differentiating attributes ( which are rendered via the Xtemplate ) So the user might type in "stringA" which would render: stringA, stringA, stringA, stringAB, stringAC etc... each of which is a discretely different id, despite some of them having identical displayValues.

If the user types in "stringA" they MUST select one one the options, or I won't know which ID it is, because I only have "stringA" and no way of knowing which one.

So far this is reasonably well handled by the forceSelection parameter... BUT:
If the user types in a wholly new "stringX" then I need to accept that value, and create a new record in the backend.

in a nutshell, I need a: forceSelectionOrVerifiedNonMatchingEntry parameter... lol