private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { DataGridViewRow row = dataGridView1.CurrentRow as DataGridViewRow; frmcargosdet frm = new frmcargosdet(row.Cells["cod"].Value.ToString()); frm.MdiParent = this.MdiParent; frm.Show(); }
protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData) { if ((!this.dataGridView1.Focused)) { return(base.ProcessCmdKey(ref msg, keyData)); } if (keyData != Keys.Enter) { return(base.ProcessCmdKey(ref msg, keyData)); } DataGridViewRow row = this.dataGridView1.CurrentRow; frmcargosdet frm = new frmcargosdet(row.Cells["cod"].Value.ToString()); frm.ShowDialog(); return(true); }
private void toolStripButton1_Click(object sender, EventArgs e) { frmcargosdet frm = new frmcargosdet(); frm.ShowDialog(); }