开发者

Winforms AutoComplete Texbox Problem

开发者 https://www.devze.com 2022-12-15 00:19 出处:网络
Look this http://csharpdotnetfreak.blogspot.com/2009/01/winforms-autocomplete-textbox-using-c.html i have applied this for City Field textbox that displays the CityNames on Typing as Suggestion

Look this http://csharpdotnetfreak.blogspot.com/2009/01/winforms-autocomplete-textbox-using-c.html

i have applied this for City Field textbox that displays the CityNames on Typing as Suggestion

I have taken a DataTable as DataSource which was pre-filled from Database.

I loop through DataT开发者_高级运维able and Add a CityNames to the AutoCompleteStringCollection

Now Problem is that How do i get Values that is(CityId) when Save My Record to the Database.


You can use Select method on DataTable to get rows matching the Textbox.Text

DT.Select("Name='" & TextBox1.Text & "'")
0

精彩评论

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