dimanche 12 février 2017

Search using textbox VB

Vote count: 0

I need to search datagridview by date. If i enter 2/11/2017 in text box , i want grid to show me rows that contains this date. Date column in my datagridview is named AppointmentDate and is created in SqlServer. Type of this column is only date. I saw this but i am using entity framework model , i don't know how to realize it.

Dim rowindex As String
Dim found as Boolean = false
For Each row As DataGridViewRow In DataGridView1.Rows
    If row.Cells.Item("ITEM_ID").Value = TextBox5.Text Then
        rowindex = row.Index.ToString()
        found = true
        Dim actie As String = row.Cells("PRICE").Value.ToString()
        MsgBox(actie)
        Exit for
    End If
Next
If Not found Then
   MsgBox("Item not found")
End if    

End Sub

asked 46 secs ago

Let's block ads! (Why?)



Search using textbox VB

Aucun commentaire:

Enregistrer un commentaire