private void AddProduct_Click(object sender, EventArgs e) { if (dgvProducts.Rows.Count == 1) { EnableFields(); } add.Enabled = false; ProductBindingSource.AddNew(); //dgvProducts.DataSource = ProductBindingSource; dgvProducts.CurrentRow.Selected = true; code_.Focus(); }
private void ProductAddButton_Click(object sender, EventArgs e) { ProductBindingSource.AddNew(); HideDataGrid(ProductDataGridView, ProductAddButton, ProductPanel); }