in form hve 1 datagrid, 1 microsoft reportviewer and 1 textbox..

all data in datagrid binding from access database..

i put this code in textbox to search data in datagrid and automaticly data will preview in reportviewer..in data grid hve 2 column, like product & model..

Me.Product_listTableAdapter.FillByproduct(Me.MydatabaseDataSet.Product_list, TextBox1.Text)

can i search 2 different data in same textbox...i mean both data in column product & model can search in 1 textbox..

Edited by arezz09: n/a

7 Years
Discussion Span
Last Post by arezz09

no...in product hve value like Sharp, Hitachi, in model column like DDhi22, ASD21qw..
so when i type DDhi22 or Hitachi in textbox1 data automaticly search ..

i hve modified query builder and type this LIKE ? + '%' in product filter and i name melthod name as FillByproduct...


if i use same code like this but diffrent method name..only second code work in search texbox..

Me.Product_listTableAdapter.FillByproduct(Me.MydatabaseDataSet.Product_list, TextBox1.Text)
Me.Product_listTableAdapter.FillBymodel(Me.MydatabaseDataSet.Product_list, TextBox1.Text)

can i combine this code or i need modified query builder,so i can search 2 data from 2 column in 1 textbox...

Edited by arezz09: n/a


What is the problem in using two separate text boxes.

Any specific reason for that ?

it does not working...it only working on the first textbox but not for the second...


i use this code in textbox1

Me.Product_listTableAdapter.FillByproduct(Me.MydatabaseDataSet.Product_list, TextBox1.Text)

this in textbox 2

Me.Product_listTableAdapter.FillBymodel(Me.MydatabaseDataSet.Product_list, TextBox2.Text)

do u know about filter multiple column ??

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.