Пример #1
0
 private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (dataGridView1.RowCount > 0)
     {
         var forma = new frm_alterCodes(dataGridView1.CurrentRow.Cells[0].Value.ToString(), label2.Text + " - " + dataGridView1.CurrentRow.Cells[1].Value.ToString(), 0);
         forma.ShowDialog();
     }
 }
Пример #2
0
 private void my_menu_Itemclicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (flag == false)
     {
         if (e.ClickedItem.Name == "ColHidden")
         {
             dataGridView1.Rows[this.dataGridView1.CurrentRow.Index].Visible = false;
             flag = true;
         }
         else if (e.ClickedItem.Name == "ColEdit")
         {
             if (dataGridView1.RowCount > 0)
             {
                 var forma = new frm_alterCodes(dataGridView1.CurrentRow.Cells[0].Value.ToString(), label2.Text + " - " + dataGridView1.CurrentRow.Cells[1].Value.ToString(), 0);
                 forma.ShowDialog();
             }
             mymenu.Visible = false;
             flag           = true;
         }
     }
 }