开发者

Combobox AutoComplete entry not found but is in DataSource and in DDL

开发者 https://www.devze.com 2023-04-10 11:22 出处:网络
Looked around the forum for this, but didn\'t see it. Hopefully I\'m not blind. Have a ComboBox (CB) with AutoComplete (AutoCompleteMode:Suggest, AutoCompleteSource:ListItems) that has roughly 4,500

Looked around the forum for this, but didn't see it. Hopefully I'm not blind.

Have a ComboBox (CB) with AutoComplete (AutoCompleteMode:Suggest, AutoCompleteSource:ListItems) that has roughly 4,500 items. Th开发者_如何学运维ere are 2 screens, 1 that can add to the DataSource and the other that displays the CB. Sometimes when I add on Screen 1 and then go to Screen 2 (I refresh the CB DataSource after the add) I do not see the newly added item in the TypeAhead. When I debug, I can see the item in the DataSource and, here's the kicker, I can see the item when I use the drop down on the CB.

So, to sum up, the item doesn't display when using Autocomplete (pic 1), but does display when using the drop down (pic 2). To make it more confusing, the item will eventually show up in the AutoComplete after a minute or two of going back and forth between AutoComplete and the Drop Down (no refreshing of the data takes place).

Thoughts?

(Well, I have 2 small pics that show my issue in perfect detail, but since i'm a noob, i can't post them. Hope you can get the idea!)

Thank you Troy


I did it long back. It worked fine for me. Remember in my case it was textbox.

combo.AutoCompleteCustomSource.Clear();
combo.AutoCompleteCustomSource = sourceFiles;  //sourceFiles=AutoCompleteStringCollection

Hope it helps.

0

精彩评论

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

关注公众号