Example #1
0
 public void MostrarTodo(object sender = null, EventArgs e = null)
 {
     try
     {
         dataGridViewNormal2.DataSource = Usuario.ListadoGeneral();
         lblCantidad.Text = "Items: " + dataGridViewNormal2.Rows.Count.ToString();
         ControlTextBoxDeBusqueda.Text = "";
         ControlTextBoxDeBusqueda.Focus();
     }
     catch (Exception exc) { MessageBox.Show(exc.Message); }
 }
Example #2
0
 private void dataGridViewNormal2_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter)
         {
             e.Handled = true;
             CargarDesdeElGrid();
         }
         else if (e.KeyCode == Keys.Up && dataGridViewNormal2.CurrentRow.Index == 0)
         {
             e.Handled = true;
             ControlTextBoxDeBusqueda.Focus();
         }
     }
     catch
     {
     }
 }