c# - Dropdown control searching method -


in below form grid contains dropdown control contains products should enter on grid, dropdown fills on form load event, a-z products present in dropdown.

see image below:

click here see form , dropdown http://imageshack.com/a/img838/5697/1knn.jpg

as can see, when press "g" show product names start g , others also. want is: if press 'g' should show product names start g only.

dim adapter new npgsqldataadapter(strsql, genconnection) adapter.fill(sourcedatasetproducts) bindsourcesale.datasource = sourcedatasetproducts sourcedatasetproducts.primarykey = new datacolumn() {sourcedatasetproducts.columns("productid")} drpdwnproducts.datasource = nothing drpdwnproducts.datasource = bindsourcesale drpdwnproducts.displaymember = "productname" drpdwnproducts.columnheaders = true drpdwnproducts.width = 800 

in way, used fill dropdown in form load.

  ' dataview of table contained in dataset.      dim tables datatablecollection = set1.tables     dim view1 new dataview(tables(0))  ' create bindingsource , set datasource property  ' dataview.  dim source1 new bindingsource() source1.datasource = view1  ' set data source products... dropdown.datasource = source1  ' filter string can include boolean expressions. source1.filter = "products = 'whatever'" 

you can use well...

 source.filter = "products like' %whatever%'" 

this start need.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -