Class CellSelection
Represents a selection of cells.
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Model
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public class CellSelection : SelectionBase
Methods
AddConditionalFormatting(ConditionalFormatting)
Adds a conditional formatting elemenet to the worksheet, applying it on the current selection ranges.
Declaration
public void AddConditionalFormatting(ConditionalFormatting formatting)
Parameters
|
ConditionalFormatting
formatting
The added conditional formatting |
CanCopy(WorksheetFragment)
Determines whether the specified fragment can be copied.
Declaration
public bool CanCopy(WorksheetFragment fragment)
Parameters
|
WorksheetFragment
fragment
The fragment. |
Returns
|
System.Boolean
The value indicating whether the specified fragment can be copied. |
CanInsertOrRemove(CellRange, ShiftType)
Determines whether the selected range can be inserted or removed using the specified shift type.
Declaration
public bool CanInsertOrRemove(CellRange selectedRange, ShiftType shiftType)
Parameters
|
CellRange
selectedRange
The selected range. |
|
ShiftType
shiftType
Type of the shift. |
Returns
|
System.Boolean
The value indicating whether the selected range can be inserted or removed using the specified shift type. |
CanPaste(WorksheetFragment)
Determines whether the specified fragment can be pasted.
Declaration
public PasteResult CanPaste(WorksheetFragment fragment)
Parameters
|
WorksheetFragment
fragment
The fragment. |
Returns
|
PasteResult
The paste result. |
ClearDataValidationRule()
Clears the data validation rule.
Declaration
public void ClearDataValidationRule()
ClearValue()
Clears the value.
Declaration
public void ClearValue()
Copy()
Copies this instance.
Declaration
public WorksheetFragment Copy()
Returns
|
WorksheetFragment
The worksheet fragment. |
FillData(FillDirection)
Fills data.
Declaration
public void FillData(FillDirection direction)
Parameters
|
FillDirection
direction
The direction. |
FillDataSeriesAuto(CellOrientation, Boolean, Nullable<Int32>)
Does auto data series fill.
Declaration
public void FillDataSeriesAuto(CellOrientation seriesOrientation, bool respectRangesDirection, int? initialValueCount = default(int? ))
Parameters
|
CellOrientation
seriesOrientation
The series orientation. |
|
System.Boolean
respectRangesDirection
The respect ranges direction. |
|
System.Nullable<System.Int32>
initialValueCount
The initial value count. |
FillDataSeriesDate(CellOrientation, DateUnitType, Double, Nullable<Double>)
Does date data series fill.
Declaration
public void FillDataSeriesDate(CellOrientation seriesOrientation, DateUnitType dateUnitType, double stepValue, double? stopValue = default(double? ))
Parameters
|
CellOrientation
seriesOrientation
The series orientation. |
|
DateUnitType
dateUnitType
Type of the date unit. |
|
System.Double
stepValue
The step value. |
|
System.Nullable<System.Double>
stopValue
The stop value. |
FillDataSeriesExponential(CellOrientation, Double, Nullable<Double>)
Does exponential data series fill.
Declaration
public void FillDataSeriesExponential(CellOrientation seriesOrientation, double stepValue, double? stopValue = default(double? ))
Parameters
|
CellOrientation
seriesOrientation
The series orientation. |
|
System.Double
stepValue
The step value. |
|
System.Nullable<System.Double>
stopValue
The stop value. |
FillDataSeriesExponentialTrend(CellOrientation)
Does exponential and trend data series fill.
Declaration
public void FillDataSeriesExponentialTrend(CellOrientation seriesOrientation)
Parameters
|
CellOrientation
seriesOrientation
The series orientation. |
FillDataSeriesLinear(CellOrientation, Double, Nullable<Double>)
Does linear data series fill.
Declaration
public void FillDataSeriesLinear(CellOrientation seriesOrientation, double stepValue, double? stopValue = default(double? ))
Parameters
|
CellOrientation
seriesOrientation
The series orientation. |
|
System.Double
stepValue
The step value. |
|
System.Nullable<System.Double>
stopValue
The stop value. |
FillDataSeriesLinearTrend(CellOrientation)
Does trend data series fill.
Declaration
public void FillDataSeriesLinearTrend(CellOrientation seriesOrientation)
Parameters
|
CellOrientation
seriesOrientation
The series orientation. |
Filter(IFilter[])
Sets the specified filters to the cell selection.
Declaration
public void Filter(params IFilter[] filters)
Parameters
|
IFilter[]
filters
The filters. |
GetConditionalFormattings()
Gets the conditional formatting elemenets that are active in the current selection.
Declaration
public IEnumerable<ConditionalFormattingRange> GetConditionalFormattings()
Returns
|
System.Collections.Generic.IEnumerable<ConditionalFormattingRange>
|
GetDataValidationRule()
Gets the data validation rule.
Declaration
public RangePropertyValue<IDataValidationRule> GetDataValidationRule()
Returns
|
RangePropertyValue<IDataValidationRule>
|
GetValue()
Gets the value.
Declaration
public RangePropertyValue<ICellValue> GetValue()
Returns
|
RangePropertyValue<ICellValue>
Returns the value of the selection. |
Insert(InsertShiftType)
Inserts this instance using the specified shift type.
Declaration
public void Insert(InsertShiftType shiftType)
Parameters
|
InsertShiftType
shiftType
Type of the shift. |
Merge()
Merges this instance.
Declaration
public bool Merge()
Returns
|
System.Boolean
The value indicating whether the merge was successful. |
MergeAcross()
Merges the instance across.
Declaration
public bool MergeAcross()
Returns
|
System.Boolean
The value indicating whether the merge was successful. |
Paste(WorksheetFragment, PasteOptions)
Pastes the specified fragment.
Declaration
public bool Paste(WorksheetFragment fragment, PasteOptions pasteOptions)
Parameters
|
WorksheetFragment
fragment
The fragment. |
|
PasteOptions
pasteOptions
The paste options. |
Returns
|
System.Boolean
The value indicating whether the paste was successful. |
Paste(WorksheetFragment, PasteOptions, out IEnumerable<CellRange>, out IEnumerable<FloatingShapeBase>)
Pastes the specified fragment.
Declaration
public bool Paste(WorksheetFragment fragment, PasteOptions pasteOptions, out IEnumerable<CellRange> affectedCellRanges, out IEnumerable<FloatingShapeBase> newShapes)
Parameters
|
WorksheetFragment
fragment
The fragment. |
|
PasteOptions
pasteOptions
The paste options. |
|
System.Collections.Generic.IEnumerable<CellRange>
affectedCellRanges
The affected cell ranges. |
|
System.Collections.Generic.IEnumerable<FloatingShapeBase>
newShapes
The new shapes. |
Returns
|
System.Boolean
The value indicating whether the paste was successful. |
Paste(WorksheetFragment, PasteOptions, out IEnumerable<FloatingShapeBase>)
Pastes the specified fragment.
Declaration
public bool Paste(WorksheetFragment fragment, PasteOptions pasteOptions, out IEnumerable<FloatingShapeBase> newShapes)
Parameters
|
WorksheetFragment
fragment
The fragment. |
|
PasteOptions
pasteOptions
The paste options. |
|
System.Collections.Generic.IEnumerable<FloatingShapeBase>
newShapes
The new shapes. |
Returns
|
System.Boolean
|
Remove(RemoveShiftType)
Removes the instance using the specified shift type.
Declaration
public void Remove(RemoveShiftType shiftType)
Parameters
|
RemoveShiftType
shiftType
Type of the shift. |
RemoveConditionalFormatting(ConditionalFormatting)
Removes the a given formatting elemenets that is active in the current selection.
Declaration
public void RemoveConditionalFormatting(ConditionalFormatting formatting)
Parameters
|
ConditionalFormatting
formatting
|
SetBorders(CellBorders)
Sets the borders.
Declaration
public override void SetBorders(CellBorders value)
Parameters
|
CellBorders
value
The value. |
Overrides
SetDataValidationRule(IDataValidationRule)
Sets the data validation rule.
Declaration
public void SetDataValidationRule(IDataValidationRule value)
Parameters
|
IDataValidationRule
value
The value. |
SetValue(Boolean)
Sets the value.
Declaration
public void SetValue(bool value)
Parameters
|
System.Boolean
value
The value. |
SetValue(DateTime)
Sets the value.
Declaration
public void SetValue(DateTime value)
Parameters
|
System.DateTime
value
The value. |
SetValue(Double)
Sets the value.
Declaration
public void SetValue(double value)
Parameters
|
System.Double
value
The value. |
SetValue(String)
Sets the value.
Declaration
public void SetValue(string value)
Parameters
|
System.String
value
The value. |
Remarks
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.
SetValue(ICellValue)
Sets the value.
Declaration
public void SetValue(ICellValue value)
Parameters
|
ICellValue
value
The value. |
SetValueAsFormula(String)
Sets the value as formula.
Declaration
public void SetValueAsFormula(string value)
Parameters
|
System.String
value
The value. |
SetValueAsText(String)
Sets the value as text.
Declaration
public void SetValueAsText(string value)
Parameters
|
System.String
value
The value. |
Sort(ISortCondition[])
Sorts the selected cells using the specified sort conditions.
Declaration
public void Sort(params ISortCondition[] sortConditions)
Parameters
|
ISortCondition[]
sortConditions
The sort conditions. |
Unmerge()
Unmerges this instance.
Declaration
public void Unmerge()