XenAdmin.Wizards.PatchingWizard.PatchingWizard_PrecheckPage.dataGridView1_KeyPress C# (CSharp) Method

dataGridView1_KeyPress() private method

private dataGridView1_KeyPress ( object sender, KeyPressEventArgs e ) : void
sender object
e KeyPressEventArgs
return void
        private void dataGridView1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Enter && dataGridView1.CurrentCell != null)
            {
                PreCheckHostRow preCheckHostRow = dataGridView1.CurrentCell.OwningRow as PreCheckHostRow;
                int columnIndex = dataGridView1.CurrentCell.ColumnIndex;

                if (preCheckHostRow != null && preCheckHostRow.Enabled && columnIndex == 2)
                    ExecuteSolution(preCheckHostRow);
            }
        }