Example #1
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0 && e.ColumnIndex == 4)
     {
         DetailForm df = new DetailForm(Currentorders[e.RowIndex], this);
         this.Hide();
         df.ShowDialog();
     }
 }
Example #2
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 4 && e.RowIndex >= 0)
     {
         DetailForm detailform = new DetailForm(orderlist[e.RowIndex], this);
         this.Hide();
         detailform.ShowDialog();
     }
     else if (e.ColumnIndex == 5 && e.RowIndex >= 0)
     {
         dataGridView1.Rows.RemoveAt(e.RowIndex);
     }
 }