private void TxtBuscar_TextChanged(object sender, EventArgs e) { try { Grado grado = new Grado(); dgvGrados.DataSource = null; dgvGrados.DataSource = grado.Buscar(txtBuscar.Text); dgvGrados.ClearSelection(); txtBuscar.Focus(); } catch (Exception Ex) { MessageBox.Show(Ex.Message); } }