CellSelection
Provides operations on a selection of one or more cell ranges, enabling batch setting of values, formatting, formulas, and data validation.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.Model
Assembly:Telerik.Windows.Documents.Spreadsheet.dll
Syntax:
public class CellSelection : SelectionBase
Inheritance: objectSelectionBaseCellSelection
Inherited Members
Methods
Adds a conditional formatting elemenet to the worksheet, applying it on the current selection ranges.
public void AddConditionalFormatting(ConditionalFormatting formatting)
The added conditional formatting
Determines whether the specified fragment can be copied.
public bool CanCopy(WorksheetFragment fragment)
The fragment.
Returns:The value indicating whether the specified fragment can be copied.
Determines whether the selected range can be inserted or removed using the specified shift type.
Determines whether the specified fragment can be pasted.
public PasteResult CanPaste(WorksheetFragment fragment)
The fragment.
Returns:The paste result.
Clears the data validation rule.
public void ClearDataValidationRule()
Clears the value.
public void ClearValue()
Copies this instance.
Fills data.
Does auto data series fill.
public void FillDataSeriesAuto(CellOrientation seriesOrientation, bool respectRangesDirection, int? initialValueCount = null)
The series orientation.
respectRangesDirectionboolThe respect ranges direction.
initialValueCountint?The initial value count.
Does date data series fill.
public void FillDataSeriesDate(CellOrientation seriesOrientation, DateUnitType dateUnitType, double stepValue, double? stopValue = null)
The series orientation.
dateUnitTypeDateUnitTypeType of the date unit.
stepValuedoubleThe step value.
stopValuedouble?The stop value.
Does exponential data series fill.
public void FillDataSeriesExponential(CellOrientation seriesOrientation, double stepValue, double? stopValue = null)
The series orientation.
stepValuedoubleThe step value.
stopValuedouble?The stop value.
Does exponential and trend data series fill.
public void FillDataSeriesExponentialTrend(CellOrientation seriesOrientation)
The series orientation.
Does linear data series fill.
public void FillDataSeriesLinear(CellOrientation seriesOrientation, double stepValue, double? stopValue = null)
The series orientation.
stepValuedoubleThe step value.
stopValuedouble?The stop value.
Does trend data series fill.
public void FillDataSeriesLinearTrend(CellOrientation seriesOrientation)
The series orientation.
Sets the specified filters to the cell selection.
Gets the conditional formatting elemenets that are active in the current selection.
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Formattings")]
public IEnumerable<ConditionalFormattingRange> GetConditionalFormattings()
Gets the data validation rule.
public RangePropertyValue<IDataValidationRule> GetDataValidationRule()
Retrieves the cell value(s) from the selection, returning a single value if uniform or an indeterminate result if mixed.
public RangePropertyValue<ICellValue> GetValue()
RangePropertyValue<ICellValue>
Returns the value of the selection.
Inserts this instance using the specified shift type.
public void Insert(InsertShiftType shiftType)
Type of the shift.
Merges this instance.
Merges the instance across.
Pastes the specified fragment.
public bool Paste(WorksheetFragment fragment, PasteOptions pasteOptions, out IEnumerable<CellRange> affectedCellRanges, out IEnumerable<FloatingShapeBase> newShapes)
The fragment.
pasteOptionsPasteOptionsThe paste options.
affectedCellRangesIEnumerable<CellRange>The affected cell ranges.
newShapesIEnumerable<FloatingShapeBase>The new shapes.
Returns:The value indicating whether the paste was successful.
Pastes the specified fragment.
public bool Paste(WorksheetFragment fragment, PasteOptions pasteOptions, out IEnumerable<FloatingShapeBase> newShapes)
The fragment.
pasteOptionsPasteOptionsThe paste options.
newShapesIEnumerable<FloatingShapeBase>The new shapes.
Returns:Pastes the specified fragment.
public bool Paste(WorksheetFragment fragment, PasteOptions pasteOptions)
The fragment.
pasteOptionsPasteOptionsThe paste options.
Returns:The value indicating whether the paste was successful.
Removes the instance using the specified shift type.
public void Remove(RemoveShiftType shiftType)
Type of the shift.
Removes the a given formatting elemenets that is active in the current selection.
public void RemoveConditionalFormatting(ConditionalFormatting formatting)
Sets the borders.
public override void SetBorders(CellBorders value)
The value.
Overrides:
Sets the data validation rule.
public void SetDataValidationRule(IDataValidationRule value)
The value.
Sets all cells in the selection to the specified boolean value.
Sets all cells in the selection to the specified date-time value and applies short date formatting if the cell format is default.
Sets all cells in the selection to the specified numeric value.
Sets the value.
Parses and sets the string value for all cells in the selection; prefer typed overloads for better performance.
public void SetValue(string value)
The value.
Please note that the string value is parsed to find its type. This process is slow. If you know the type of your data use the other overloads of this method.
Sets all cells in the selection to the specified formula string, which will calculate dynamically.
Sets all cells in the selection to the specified value as literal text, bypassing number and formula parsing.
Sorts the selected cells using the specified sort conditions.
public void Sort(params ISortCondition[] sortConditions)
The sort conditions.
Unmerges this instance.
public void Unmerge()