Hello everyone good morning?
Would you like some help on how to make an appointment with a DataGrid textbox using the filter to type in the textbox.
Use this form here tried but failed. Could someone pass me a solution?
Would you like some help on how to make an appointment with a DataGrid textbox using the filter to type in the textbox.
Use this form here tried but failed. Could someone pass me a solution?
Code:
//Code that lists all contacts in the Form
Public Sub AllContact(ByVal resul As Boolean)
'Dim cliente As New Customers()
Dim objContact As New DALContact()
Try
Dim ds As DataSet = objContact.AllContact()
Dim dt As DataTable = ds.Tables(0)
dv = dt.DefaultView
If ds.Tables(0).Rows.Count > 0 Then
With dv
.AllowNew = False
.AllowDelete = False
.AllowEdit = False
.Sort = " Pes_contact_Name ASC "
End With
gvContact.DataSource = dv
bs.DataSource = ds
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
//Code Textbox
Private Sub txtSearchCustomers_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBuscaClientes.TextChanged
Try
Dim txtstring As Integer= Me.txtSearchCustomers.Text
If rdbIDCustomers.Checked = True Then
Dim dv As DataView = Me.gvContact.DataSource
dv.RowFilter = "Pes_contact_ID LIKE '" & txtstring & "%'"
Me.gvContact.DataSource = dv
End If
Catch ex As Exception
Throw ex
End Try
End Sub
Comment