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
Private Function Find(ByVal StrSearchString As String) As Boolean
DataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect
Dim intcount As Integer = 0
For Each Row As DataGridViewRow In DataGridView1.Rows
If DataGridView1.Rows(intcount).Cells(0).Value.ToString = StrSearchString Then
DataGridView1.Rows(intcount).Selected = True
Find = True
intcount += 1
Find = False
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
Hey guys I have been closely watching your threads regarding searching a record in a datagrid as I have the same problem as Geetajilo.
I can easily search for something in a datagrid by entering a field into a textbox and pressing the search button. This works fine when the record is already in the datagrid, but however how can you retrieve a record from the database and place it in the datagrid.??
For Each CurrentRow As DataGridViewRow In DgCustomerList.Rows
If CurrentRow.Cells(3).Value.ToString.Contains(TxtSearch.Text) Then
CurrentRow.Selected = True
DgCustomerList.Rows(0).Selected = True
Edited 6 Years Ago by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).
plz help me to sold my problem... I have a database(access) and all I want is to view all the records of the person that l've searching.. using textbox and view it in the DataGrid. I using vb6 and my database is access. what is the best code for my problem? plz........
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...