If function
i have a code to search a datagrid to find the text i typed in the textbox.when the wordt isn't found , or there is no text in the text box , i want a msgbox to open.
can somebody help me whit the code
Dim strcolumn, strsearchvalueAsString
strcolumn = CataloogDataSet2.boltype.Columns(0).ColumnName
strsearchvalue = toolstriptextbox1.Text
Me.BoltypeBindingSource.Position =Me.BoltypeBindingSource.Find(strcolumn, strsearchvalue)
Try this...
Dim strcolumn, strsearchvalue As String
strcolumn = CataloogDataSet2.boltype.Columns(0).ColumnName
strsearchvalue = toolstriptextbox1.Text
Dim index As int
index = Me.BoltypeBindingSource.Find(strcolumn, strsearchvalue)
If index >= 0 Then
Me.BoltypeBindingSource.Position = index
Else
MessageBox.Show("Not Found!")
End If
just check for any syntax errors as i'm typing this code directly without testing it in VS IDE.