Autocomplete that looks for symbols a string contains rather than starts with

前端 未结 2 1061
太阳男子
太阳男子 2021-01-16 12:20

I\'m writing a program that at one point implements a TextBox with autocomplete. Currently, for purpose of simplicity I\'m using CustomSource manua

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-16 12:43

    the list you are search in try use the condition to get in list or not

    stringItemInList.IndexOf("txtwhatyousearchfor",StringComparison.OrdinalIgnoreCase) != -1
    

    if you connect to a database use in you query

    parameter LIKE '%txthere%'
    

    Regards

    UPDATE

    after you comment

    The best option I see would be to create your own implementation of IAutoComplete. Here is info on it: http://msdn.microsoft.com/en-us/library/bb776292%28VS.85%29.aspx

    Also you can do some searches for some code samples of people creating their own IAutoComplete implementations.

    Regards

提交回复
热议问题