ClassRadWorksheetEditor
Represents a visual editor for a spreadsheet worksheet that provides user interface capabilities for editing, selection, and navigation within the worksheet data.
Definition
Namespace:Telerik.WinForms.Controls.Spreadsheet.Worksheets
Assembly:Telerik.WinControls.RadSpreadsheet.dll
Syntax:
public class RadWorksheetEditor : RadSheetEditorBase<Worksheet>, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IRadSheetEditor, ICommandDescriptorsProvider, ISheetEditor, IUILayerOwner, IDisposable
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIElementControlBaseRadSheetEditorBaseRadSheetEditorBase<Worksheet>RadWorksheetEditor
Implements:
Inherited Members
Constructors
RadWorksheetEditor(RadSpreadsheetElement)
Initializes a new instance of the RadWorksheetEditor class with default visible size and the specified owner.
Declaration
public RadWorksheetEditor(RadSpreadsheetElement owner)
Parameters
owner
The RadSpreadsheetElement that owns this worksheet editor.
RadWorksheetEditor(SizeI, RadSpreadsheetElement)
Initializes a new instance of the RadWorksheetEditor class with the specified visible size and owner.
Declaration
public RadWorksheetEditor(SizeI visibleSize, RadSpreadsheetElement owner)
Parameters
visibleSize
The dimensions of the visible area for the worksheet editor.
owner
The RadSpreadsheetElement that owns this worksheet editor.
Fields
LeftMarginsPanelName
The name identifier for the left margins panel within the worksheet editor layout.
TopMarginsPanelName
The name identifier for the top margins panel within the worksheet editor layout.
Properties
ActivePresenter
Gets the currently active presenter responsible for rendering the worksheet content.
Declaration
public IRadWorksheetEditorPresenter ActivePresenter { get; }
Property Value
Commands
Gets the collection of commands available for worksheet editing operations.
Declaration
public RadWorksheetEditorCommands Commands { get; }
Property Value
Dialogs
Gets the dialog management system for worksheet editor operations.
Declaration
public WorksheetEditorDialogs Dialogs { get; }
Property Value
WorksheetEditorDialogs
FrozenCellIndex
Gets the cell index that is positioned below the top frozen pane and to the right of the left frozen pane.
HorizontalScrollMode
Gets or sets the horizontal scrolling behavior for the worksheet editor.
Declaration
public ScrollMode HorizontalScrollMode { get; set; }
Property Value
IsHorizontalViewportUpdateSuspended
Gets a value indicating whether horizontal viewport updates are currently suspended.
Declaration
public bool IsHorizontalViewportUpdateSuspended { get; }
Property Value
IsVerticalViewportUpdateSuspended
Gets a value indicating whether vertical viewport updates are currently suspended.
Declaration
public bool IsVerticalViewportUpdateSuspended { get; }
Property Value
Selection
Gets the current cell and range selection within the worksheet.
SheetViewport
Gets the viewport information for the currently displayed portion of the worksheet.
Declaration
public override SheetViewport SheetViewport { get; }
Property Value
Overrides
ShowGridlines
Gets or sets a value indicating whether gridlines are displayed in the worksheet.
ShowRowColumnHeadings
Gets or sets a value indicating whether row and column headings are displayed in the worksheet.
TopLeftCellIndex
Gets the cell index of the top-left visible cell in the current view.
VerticalScrollMode
Gets or sets the vertical scrolling behavior for the worksheet editor.
Declaration
public ScrollMode VerticalScrollMode { get; set; }
Property Value
VisibleSize
Gets the dimensions of the visible area within the worksheet editor.
Methods
ArrangeOverride(SizeF)
Arranges the RadElement to its final location. The element must call the Arrange method of each of its children.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
finalSize
The size that is available for element.
Returns
The rectangle occupied by the element. Usually finalSize. Should you return different size, the Layout system will restart measuring and rearranging the items. That could lead to infinite recursion.
Overrides
Remarks
In this method call to the Arrange method of each child must be made.
BringIntoView(CellIndex)
Scrolls the worksheet view to ensure the specified cell is visible within the current viewport.
Declaration
public void BringIntoView(CellIndex cellIndex)
Parameters
cellIndex
The cell index to bring into view.
CircleInvalidData()
Displays visual circles around cells containing invalid data according to data validation rules.
Declaration
public void CircleInvalidData()
Clear(ClearType)
Clears the selected cells.
Declaration
public void Clear(ClearType clearType)
Parameters
clearType
Type of the clear.
ClearInvalidDataCircles()
Removes the visual circles that mark cells with invalid data.
Declaration
public void ClearInvalidDataCircles()
Copy()
Copies the selected cell values and formatting.
CreateHistoryState()
Creates a snapshot of the current worksheet editor state for history tracking purposes.
Declaration
public RadWorksheetEditorHistoryState CreateHistoryState()
Returns
RadWorksheetEditorHistoryState
A RadWorksheetEditorHistoryState representing the current state.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Implements
Dispose(bool)
Disposes the specified clean up managed resources.
Declaration
protected virtual void Dispose(bool cleanUpManagedResources)
Parameters
cleanUpManagedResources
The clean up managed resources.
DisposeManagedResources()
Releases managed resources used by this element.
Declaration
protected override void DisposeManagedResources()
Overrides
FreezePanes(CellIndex)
Freezes the worksheet panes at the specified cell position, creating fixed rows and columns.
Declaration
public void FreezePanes(CellIndex cellIndex)
Parameters
cellIndex
The cell index where the freeze should occur.
GetCellLayoutBox(CellIndex)
Gets the cell layout box.
Declaration
public CellLayoutBox GetCellLayoutBox(CellIndex cellIndex)
Parameters
cellIndex
Index of the cell.
Returns
The cell layout box.
GetCellLayoutBox(int, int)
Gets the cell layout box.
Declaration
public CellLayoutBox GetCellLayoutBox(int rowIndex, int columnIndex)
Parameters
rowIndex
Index of the row.
columnIndex
Index of the column.
Returns
The cell layout box.
InvalidatePresenterLayout()
Invalidates the presenter layout.
Declaration
public void InvalidatePresenterLayout()
MeasureOverride(SizeF)
When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
availableSize
The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.
Returns
The size that this element determines it needs during layout, based on its calculations of child element sizes.
Overrides
OnActivePresenterChanged()
Raises the ActivePresenterChanged event.
Declaration
protected virtual void OnActivePresenterChanged()
OnFilterMenuOpened(FilterMenuPopupOpenedEventArgs)
Raises the FilterMenuOpened event.
Declaration
protected virtual void OnFilterMenuOpened(FilterMenuPopupOpenedEventArgs args)
Parameters
args
FilterMenuPopupOpenedEventArgs
The event arguments containing opened filter menu information.
OnFilterMenuOpening(FilterMenuPopupOpeningEventArgs)
Raises the FilterMenuOpening event.
Declaration
protected virtual void OnFilterMenuOpening(FilterMenuPopupOpeningEventArgs args)
Parameters
args
FilterMenuPopupOpeningEventArgs
The event arguments containing filter menu information.
OnHyperlinkClicked(SpreadsheetHyperlinkClickedEventArgs)
Raises the HyperlinkClicked event.
Declaration
protected virtual void OnHyperlinkClicked(SpreadsheetHyperlinkClickedEventArgs args)
Parameters
args
SpreadsheetHyperlinkClickedEventArgs
The event arguments containing hyperlink information.
OnOwnerChanged()
Called when the owner is changed.
Declaration
protected override void OnOwnerChanged()
Overrides
OnOwnerChanging()
Raises the event.
Declaration
protected override void OnOwnerChanging()
Overrides
OnScaleFactorChanged()
Raises the event.
Declaration
protected override void OnScaleFactorChanged()
Overrides
OnScrollBarProviderChanged()
Called when the scroll bar provider is changed.
Declaration
protected override void OnScrollBarProviderChanged()
Overrides
OnScrollModeChanged()
Raises the ScrollModeChanged event.
Declaration
protected virtual void OnScrollModeChanged()
OnSheetChanged()
Called when the worksheet has changed, setting up event handlers and initializing the new worksheet.
Declaration
protected override void OnSheetChanged()
Overrides
OnSheetChanging()
Called when the worksheet is about to change, allowing for cleanup of event handlers and resources.
Declaration
protected override void OnSheetChanging()
Overrides
OpenHyperlink(HyperlinkInfo, CellIndex)
Opens and navigates to the specified hyperlink.
Declaration
public void OpenHyperlink(HyperlinkInfo hyperlink, CellIndex cellIndex = null)
Parameters
hyperlink
The hyperlink information to open.
cellIndex
Index of the cell.
Paste()
Pastes in the selected cells the cell values and formatting.
Paste(PasteOptions)
Pastes in the selected cells respecting the specified paste options.
Declaration
public bool Paste(PasteOptions pasteOptions)
Parameters
pasteOptions
The paste options.
Returns
True if succeed.
PreserveSheetViewState(ISheetViewState)
Preserves the view state of the sheet.
Declaration
protected override void PreserveSheetViewState(ISheetViewState viewState)
Parameters
viewState
View state of the sheet.
Overrides
ReceiveWeakEvent(Type, object, EventArgs)
Receives events from the centralized event manager.
Declaration
public bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
Parameters
managerType
The type of the WeakEventManager calling this method.
sender
Object that originated the event.
e
Event data.
Returns
true if the listener handled the event. It is considered an error by the WeakEventManager handling in WPF to register a listener for an event that the listener does not handle. Regardless, the method should return false if it receives an event that it does not recognize or handle.
RestoreHistoryState(RadWorksheetEditorHistoryState)
Restores the worksheet editor to a previously saved history state.
Declaration
public void RestoreHistoryState(RadWorksheetEditorHistoryState historyState)
Parameters
historyState
RadWorksheetEditorHistoryState
The history state to restore.
RestoreSheetViewState(ISheetViewState)
Restores the view state of the sheet.
Declaration
protected override void RestoreSheetViewState(ISheetViewState viewState)
Parameters
viewState
View state of the sheet.
Overrides
ResumeViewportUpdate()
Resumes viewport updates that were previously suspended by SuspendViewportUpdate().
Declaration
public void ResumeViewportUpdate()
SetHorizontalOffset(double)
Sets the horizontal offset.
Declaration
public override void SetHorizontalOffset(double offset)
Parameters
offset
The offset.
Overrides
SetVerticalOffset(double)
Sets the vertical offset.
Declaration
public override void SetVerticalOffset(double offset)
Parameters
offset
The offset.
Overrides
ShouldArrangeChild(RadElement)
Gets a value indicating whether a child will be arranged during the ArrangeOverride(SizeF).
Declaration
protected override bool ShouldArrangeChild(RadElement child)
Parameters
child
The child element to check.
Returns
Whether the child will be arranged in ArrangeOverride.
Overrides
ShouldMeasureChild(RadElement)
Gets a value indicating, whether a child will be measured during the MeasureOverride.
Declaration
protected override bool ShouldMeasureChild(RadElement child)
Parameters
child
The child.
Returns
Whether the child will be measured in MeasureOverride.
Overrides
SuspendViewportUpdate()
Temporarily suspends viewport updates to improve performance during multiple operations.
Declaration
public void SuspendViewportUpdate()
UnfreezePanes()
Removes any frozen panes from the worksheet, allowing all rows and columns to scroll freely.
Declaration
public void UnfreezePanes()
UpdateToViewWithTopLeftCellIndex(CellIndex)
Updates the viewport to position the specified cell as the top-left visible cell.
Declaration
public void UpdateToViewWithTopLeftCellIndex(CellIndex cellIndex)
Parameters
cellIndex
The cell index to position at the top-left of the viewport.
Events
ActivePresenterChanged
Occurs when the active presenter changes to a different worksheet presenter implementation.
Declaration
public event EventHandler ActivePresenterChanged
Event Value
FilterMenuOpened
Occurs when a filter menu popup has been opened and is displayed to the user.
Declaration
public event FilterMenuPopupOpenedEventHandler FilterMenuOpened
Event Value
FilterMenuOpening
Occurs when a filter menu popup is about to open, allowing for customization of the filter options.
Declaration
public event FilterMenuPopupOpeningEventHandler FilterMenuOpening
Event Value
HyperlinkClicked
Occurs when a hyperlink within a worksheet cell is clicked by the user.
Declaration
public event EventHandler<SpreadsheetHyperlinkClickedEventArgs> HyperlinkClicked
Event Value
ScrollModeChanged
Occurs when the horizontal or vertical scroll mode changes.