Example #1
0
 private void ContactsGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > 0 && e.RowIndex < contactDataGridView.Rows.Count)
     {
         DataGridViewRow row = contactDataGridView.Rows[e.RowIndex];
         Contact selectedContact = row.DataBoundItem as Contact;
         if (selectedContact != null)
         {
             ContactEditDialog dialog = new ContactEditDialog(
                 new EditableContact(selectedContact));
             dialog.ShowDialog();
         }
     }
 }
Example #2
0
 private void ContactsGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > 0 && e.RowIndex < contactDataGridView.Rows.Count)
     {
         DataGridViewRow row             = contactDataGridView.Rows[e.RowIndex];
         Contact         selectedContact = row.DataBoundItem as Contact;
         if (selectedContact != null)
         {
             ContactEditDialog dialog = new ContactEditDialog(
                 new EditableContact(selectedContact));
             dialog.ShowDialog();
         }
     }
 }