To Search a record in datagridview
hi friends...
i want to search a record from a datagridview with an input box...
Can anyone help me plz...
It's 4 my project ...
Need help plzzzz...
geetajlo
Junior Poster in Training
72 posts since Sep 2007
Reputation Points: 8
Solved Threads: 0
So you need to type the parameter in a input box to filter the Grid?
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
Are you using VS 2003 or VS 2005?
Database SQL or Access?
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
VS 2005 et database Access
geetajlo
Junior Poster in Training
72 posts since Sep 2007
Reputation Points: 8
Solved Threads: 0
Do you want to search a particuar column from the DB or just any text in the Grid?
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
You Can use something like this using DataView
Dim dv As New DataView(ds.Tables(0))
dv.RowFilter = "FirstName = '" & TextBox1.Text & "'"
DataGrid1.DataSource = dv
You can replace the Textbox2.text to the value returned from the inputbox.
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
hi thanks it works...
the search works, it select only the fullrows containing the firstname i type in the input box but all the other data disappear.
i don't want it to disapppear, i want it to be in the datagrid..
help me plz
geetajlo
Junior Poster in Training
72 posts since Sep 2007
Reputation Points: 8
Solved Threads: 0
i want to search a particular rows in the datagrid..
for example Any columns containing the data the user want to type, i want only the the data to be selected
for ex the user may want to serach all female, then only the rows female will b selected
geetajlo
Junior Poster in Training
72 posts since Sep 2007
Reputation Points: 8
Solved Threads: 0
I think the logic from Triss would do that. Let me know.
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
Hey Friends but where should i put the private function find
coz am using a button with an input box..
And wat should i put in the button search ,coz, there is nothing there except the input box...
geetajlo
Junior Poster in Training
72 posts since Sep 2007
Reputation Points: 8
Solved Threads: 0
Hey Triss
the button search doesn't do anything whevever i click it...
y
geetajlo
Junior Poster in Training
72 posts since Sep 2007
Reputation Points: 8
Solved Threads: 0
hey i have already copy n paste the function on the form and put the code call find to the button but it doesn't works. i have enter something in the textbox 2 n then press the button but nothing happens.
Help Me plzzz
geetajlo
Junior Poster in Training
72 posts since Sep 2007
Reputation Points: 8
Solved Threads: 0
Hi triss can u help me how can i search name that starts with the letter F in a datagridview.
For example if i type F in the inputbox i got every name started with the letter F.
geetajlo
Junior Poster in Training
72 posts since Sep 2007
Reputation Points: 8
Solved Threads: 0