private void TextBox1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == Convert.ToChar(Keys.Enter)) { dataGridView1.DataSource = ProductosDAL.Buscar1(textBox1.Text); } }
private void Button1_Click(object sender, EventArgs e) { dataGridView1.DataSource = ProductosDAL.Buscar1(textBox1.Text); }