开发者

SuggestAppend Combobox shows doesnt show duplicate names (if exists)

I have a combobox of Names. There can be person with similar name. Now if I set AutoComplet开发者_JS百科eMode Property of ComboBox to SuggestAppend and if there are two records with same name, the SuggestAppend DropDown list shows only the first value (name).

Actual List:

SuggestAppend Combobox shows doesnt show duplicate names (if exists)

Notice two Ratan Tata names here

Suggest Append:

When I type R in comboBox, it shows only one value of RatanTata

SuggestAppend Combobox shows doesnt show duplicate names (if exists)

So now I get two problems due to this.

Problem 1: As said, we see only one name in the SuggestAppend DropDownlist.

Problem 2: Depending on the selected item in combobox, other controls on the form (textbox, listbox, combobox) shows the respective data of that selected contact.

Now in the scenario of duplicate names, when I manually select the 2nd Ratan Tata name, I see the details of 2nd Ratan Tata in respective controls on the form. But as and when I move out of the combobox (using tab or mouse click on other control) the respective data in the other controls changes to the value of 1st Ratan Tata.

I hope I am clear in explanation. Thanks in advance.


I think you should use Suggest instead of using SuggestAppend. Below is an explanation from MSDN when to use Suggest and when SuggestAppend:

None: Disables the automatic completion feature for the ComboBox and TextBox controls.

Suggest: Displays the auxiliary drop-down list associated with the edit control. This drop-down is populated with one or more suggested completion strings.

Append: Appends the remainder of the most likely candidate string to the existing characters, highlighting the appended characters.

SuggestAppend: Applies both Suggest and Append options.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜