Change the TextChanged event with below.
C#
private void txtCustomers_TextChanged(object sender, EventArgs e)
{
DataRow[] rows = this.GetData().Select("Name='" + txtCustomers.Text.Trim() + "'");
if (rows.Length == 0)
{
MessageBox.Show("Please select from List only.");
}
}
VB.Net
Private Sub txtCustomers_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles txtCustomers.TextChanged
Dim rows As DataRow() = Me.GetData().Select("Name='" & txtCustomers.Text.Trim() & "'")
If rows.Length = 0 Then
MessageBox.Show("Please select from List only.")
End If
End Sub