private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { int row = Convert.ToInt32(dataGridViewProductList.CurrentCell.RowIndex); if (row != null) { EditProduct ep = new EditProduct(dataGridViewProductList[0, row].Value.ToString()); ep.ShowDialog(); } populateProductList(); dataGridViewProductList[1, row].Selected = true; }
private void dataGridViewProductList_DoubleClick(object sender, EventArgs e) { int row = Convert.ToInt32(dataGridViewProductList.CurrentCell.RowIndex); if (row != null) { EditProduct ep = new EditProduct(dataGridViewProductList[0, row].Value.ToString()); ep.ShowDialog(); } populateProductList(); try { dataGridViewProductList[1, row].Selected = true; } catch (Exception x) { } }