Example #1
0
        private void action_AddStepBelowSelection(object sender, EventArgs e)
        {
            if (!gridviewManager.event_SingleRowSelected(gridview))
            {
                return;
            }
            if (!event_ValidateControls())
            {
                return;
            }

            DataGridViewRow row         = gridview.SelectedRows[0];
            int             insertIndex = row.Index + 1;

            event_AddStepToGridview(insertIndex);
            gridview.ClearSelection();
        }
        private void action_AddComponentBelow(object sender, EventArgs e)
        {
            try {

                if (!gridviewManager.event_SingleRowSelected(gridview)) { return; }
                DataGridViewRow selectedRow = gridview.SelectedRows[0];
                int insertIndex = selectedRow.Index + 1;
                event_AddComponentToGridview(insertIndex);
                gridview.ClearSelection();
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }