コード例 #1
0
        private void add_ToolStripButton_Click(object sender, EventArgs e)
        {
            ActiveDirectoryGroup group = new ActiveDirectoryGroup();

            if (EditEntry(group) == DialogResult.OK)
            {
                _context.AddToActiveDirectoryGroups(group);
                _selectedItemsList.Add(group);

                int index = activeDirectory_DataGridView.Rows.Count - 1;

                activeDirectory_DataGridView.Rows[index].Selected = true;

                //In case if you want to scroll down as well.
                activeDirectory_DataGridView.FirstDisplayedScrollingRowIndex = index;
            }
        }