private void enterSeleccion(object sender, KeyPressEventArgs e) { try { if ((int)e.KeyChar == (int)Keys.Enter) { tiposVehiculos = BllTipo.buscarStringTipo(txtBuscar.Text); grdTipos.DataSource = tiposVehiculos; txtCantidadRegistros.Text = "" + tiposVehiculos.Count; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error de transacción", MessageBoxButtons.OK, MessageBoxIcon.Error); } }