TextBox AutoComplete Not working properly

后端 未结 5 561
天涯浪人
天涯浪人 2021-01-20 14:29

I am trying to implement a textbox autocomplete with a custom datasource in the form of an array which shows suggestions on single character input. But when i run the progra

5条回答
  •  独厮守ぢ
    2021-01-20 14:55

    If 'arr' is empty when you initialize the textbox then there is nothing to compare to. You have to initialize AutoCompleteCustomSource to a valid array before you start typing. You are initializing in textchange event, when the user has already typed a character.

    You need to populate the namesCollection before the code is changed - in Initialize.

提交回复
热议问题