Пример #1
0
        private void KeyCtrlSelectRow(GridContainer row)
        {
            if (row != null)
            {
                ActiveElement = row;

                row.IsSelected = !row.IsSelected;

                row.EnsureVisible();
            }
        }
Пример #2
0
        internal bool KeySelectRow(GridPanel panel,
            GridContainer row, bool select, bool extend)
        {
            if (row != null)
            {
                int rowIndex = row.RowIndex;

                if (row.CanSetActiveRow(false) == true)
                {
                    if (panel.SetActiveRow(row, true) == true)
                    {
                        if (select == true && extend == false)
                            panel.SelectionRowAnchor = row;
                    }

                    if (select == true)
                    {
                        if (rowIndex != row.RowIndex)
                            ArrangeGrid();

                        row.ExtendSelection(panel, row, extend);

                        panel.InvalidateRender();
                    }
                    else
                    {
                        if (ActiveElement != null)
                            ActiveElement.InvalidateRender();

                        row.InvalidateRender();
                    }

                    panel.LastProcessedItem = row;

                    row.EnsureVisible();
                }

                return (true);
            }

            return (false);
        }