private void tbSearchText_TextChanged(object sender, EventArgs e) { Friends.con.Open(); str = "SELECT EmployeeName From Admin "; cmd = new OleDbCommand(str, Friends.con); OleDbDataAdapter da = new OleDbDataAdapter(cmd); DataTable dtEmployee = new DataTable(); da.Fill(dtEmployee); if (dtEmployee.Rows.Count > 0) { dtEmployee.DefaultView.RowFilter = "EmployeeName Like '" + tbSearchText.Text + "*'"; dtEmployee.DefaultView.Sort = "EmployeeName"; DGVEmployeeResult.ClearSelection(); } Friends.con.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)