SourceGrid.GridVirtual.CreateSelectionObject C# (CSharp) Method

CreateSelectionObject() protected method

Virtual factory method used to create the SelectionBase derived object. The base method create a different object based on the value of SelectionMode property.
protected CreateSelectionObject ( ) : SelectionBase
return SourceGrid.Selection.SelectionBase
        protected virtual Selection.SelectionBase CreateSelectionObject()
        {
            switch (SelectionMode)
            {
                case GridSelectionMode.Cell:
                    return new Selection.FreeSelection();
                case GridSelectionMode.Column:
                    return new Selection.ColumnSelection();
                case GridSelectionMode.Row:
                    return new Selection.RowSelection();
                default:
                    throw new ArgumentException("SelectionMode not valid", "SelectionMode");
            }
        }