Ejemplo n.º 1
0
        private void ComboBoxItem_Selected(object sender, RoutedEventArgs e)
        {
            ComboBoxItem       item = (ComboBoxItem)sender;
            String             text = item.Content.ToString();
            GridSelectionFlags flag = GridSelectionFlags.Any;

            switch (text)
            {
            case "Any":
                flag = GridSelectionFlags.Any;
                break;

            case "Cell":
                flag = GridSelectionFlags.Cell;
                break;

            case "Column":
                flag = GridSelectionFlags.Column;
                break;

            case "Keyboard":
                flag = GridSelectionFlags.Keyboard;
                break;

            case "Mix range type":
                flag = GridSelectionFlags.MixRangeType;
                break;

            case "Multiple":
                flag = GridSelectionFlags.Multiple;
                break;

            case "None":
                flag = GridSelectionFlags.None;
                break;

            case "Row":
                flag = GridSelectionFlags.Row;
                break;

            case "Shift":
                flag = GridSelectionFlags.Shift;
                break;

            case "Table":
                flag = GridSelectionFlags.Table;
                break;
            }
            grid.Model.Options.AllowSelection = flag;
            this.grid.InvalidateCells();
        }
Ejemplo n.º 2
0
        private void Check(Syncfusion.Windows.Forms.Tools.CheckBoxAdv checkBox, GridSelectionFlags flag)
        {
            checkListUnchecked();
            if (inCheckAll)
                return;
            inCheck = true;
            if (checkBox.Checked)
                this.gridControl1.AllowSelection |= flag;
            else
                this.gridControl1.AllowSelection &= ~flag;

            checkBox2.Checked = false;
            inCheck = false;            
        }