RadWorksheetEditor
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
Initializes a new instance of the RadWorksheetEditor class with default visible size and the specified owner.
public RadWorksheetEditor(RadSpreadsheetElement owner)
The RadSpreadsheetElement that owns this worksheet editor.
Initializes a new instance of the RadWorksheetEditor class with the specified visible size and owner.
public RadWorksheetEditor(SizeI visibleSize, RadSpreadsheetElement owner)
The dimensions of the visible area for the worksheet editor.
ownerRadSpreadsheetElementThe RadSpreadsheetElement that owns this worksheet editor.
Fields
The name identifier for the left margins panel within the worksheet editor layout.
public static readonly string LeftMarginsPanelName
The name identifier for the top margins panel within the worksheet editor layout.
public static readonly string TopMarginsPanelName
Properties
Gets the currently active presenter responsible for rendering the worksheet content.
public IRadWorksheetEditorPresenter ActivePresenter { get; }
Gets the collection of commands available for worksheet editing operations.
public RadWorksheetEditorCommands Commands { get; }
Dialogs
WorksheetEditorDialogs
Gets the dialog management system for worksheet editor operations.
public WorksheetEditorDialogs Dialogs { get; }
Gets the cell index that is positioned below the top frozen pane and to the right of the left frozen pane.
public CellIndex FrozenCellIndex { get; }
Gets or sets the horizontal scrolling behavior for the worksheet editor.
public ScrollMode HorizontalScrollMode { get; set; }
Gets a value indicating whether horizontal viewport updates are currently suspended.
public bool IsHorizontalViewportUpdateSuspended { get; }
Gets a value indicating whether vertical viewport updates are currently suspended.
public bool IsVerticalViewportUpdateSuspended { get; }
Gets the current cell and range selection within the worksheet.
public Selection Selection { get; }
Gets the viewport information for the currently displayed portion of the worksheet.
public override SheetViewport SheetViewport { get; }
Overrides:
Gets or sets a value indicating whether gridlines are displayed in the worksheet.
public bool ShowGridlines { get; set; }
Gets or sets a value indicating whether row and column headings are displayed in the worksheet.
public bool ShowRowColumnHeadings { get; set; }
Gets the cell index of the top-left visible cell in the current view.
public CellIndex TopLeftCellIndex { get; }
Gets or sets the vertical scrolling behavior for the worksheet editor.
public ScrollMode VerticalScrollMode { get; set; }
Gets the dimensions of the visible area within the worksheet editor.
public SizeI VisibleSize { get; }
Methods
Arranges the RadElement to its final location. The element must call the Arrange method of each of its children.
protected override SizeF ArrangeOverride(SizeF 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:
In this method call to the Arrange method of each child must be made.
Scrolls the worksheet view to ensure the specified cell is visible within the current viewport.
public void BringIntoView(CellIndex cellIndex)
The cell index to bring into view.
Displays visual circles around cells containing invalid data according to data validation rules.
public void CircleInvalidData()
Clears the selected cells.
Removes the visual circles that mark cells with invalid data.
public void ClearInvalidDataCircles()
Copies the selected cell values and formatting.
Creates a snapshot of the current worksheet editor state for history tracking purposes.
public RadWorksheetEditorHistoryState CreateHistoryState()
RadWorksheetEditorHistoryState
A RadWorksheetEditorHistoryState representing the current state.
Cuts the selected cell values and formatting.
public void Cut()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Implements:
Disposes the specified clean up managed resources.
protected virtual void Dispose(bool cleanUpManagedResources)
The clean up managed resources.
Releases managed resources used by this element.
protected override void DisposeManagedResources()
Overrides:
Freezes the worksheet panes at the specified cell position, creating fixed rows and columns.
public void FreezePanes(CellIndex cellIndex)
The cell index where the freeze should occur.
Gets the cell layout box.
public CellLayoutBox GetCellLayoutBox(CellIndex cellIndex)
Index of the cell.
Returns:The cell layout box.
Invalidates the presenter layout.
public void InvalidatePresenterLayout()
When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.
protected override SizeF MeasureOverride(SizeF 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:
Raises the ActivePresenterChanged event.
protected virtual void OnActivePresenterChanged()
Raises the FilterMenuOpened event.
protected virtual void OnFilterMenuOpened(FilterMenuPopupOpenedEventArgs args)
The event arguments containing opened filter menu information.
Raises the FilterMenuOpening event.
protected virtual void OnFilterMenuOpening(FilterMenuPopupOpeningEventArgs args)
The event arguments containing filter menu information.
Raises the HyperlinkClicked event.
protected virtual void OnHyperlinkClicked(SpreadsheetHyperlinkClickedEventArgs args)
The event arguments containing hyperlink information.
Called when the owner is changed.
protected override void OnOwnerChanged()
Overrides:
Raises the event.
protected override void OnOwnerChanging()
Overrides:
Raises the event.
protected override void OnScaleFactorChanged()
Overrides:
Called when the scroll bar provider is changed.
protected override void OnScrollBarProviderChanged()
Overrides:
Raises the ScrollModeChanged event.
protected virtual void OnScrollModeChanged()
Called when the worksheet has changed, setting up event handlers and initializing the new worksheet.
protected override void OnSheetChanged()
Overrides:
Called when the worksheet is about to change, allowing for cleanup of event handlers and resources.
protected override void OnSheetChanging()
Overrides:
Opens and navigates to the specified hyperlink.
public void OpenHyperlink(HyperlinkInfo hyperlink, CellIndex cellIndex = null)
The hyperlink information to open.
cellIndexCellIndexIndex of the cell.
Pastes in the selected cells the cell values and formatting.
Pastes in the selected cells respecting the specified paste options.
public bool Paste(PasteOptions pasteOptions)
The paste options.
Returns:True if succeed.
Preserves the view state of the sheet.
protected override void PreserveSheetViewState(ISheetViewState viewState)
View state of the sheet.
Overrides:
Receives events from the centralized event manager.
public bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
The type of the WeakEventManager calling this method.
senderobjectObject that originated the event.
eEventArgsEvent 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.
Restores the worksheet editor to a previously saved history state.
public void RestoreHistoryState(RadWorksheetEditorHistoryState historyState)
The history state to restore.
Restores the view state of the sheet.
protected override void RestoreSheetViewState(ISheetViewState viewState)
View state of the sheet.
Overrides:
Resumes viewport updates that were previously suspended by SuspendViewportUpdate().
public void ResumeViewportUpdate()
Sets the horizontal offset.
public override void SetHorizontalOffset(double offset)
The offset.
Overrides:
Sets the vertical offset.
public override void SetVerticalOffset(double offset)
The offset.
Overrides:
Gets a value indicating whether a child will be arranged during the ArrangeOverride(SizeF).
protected override bool ShouldArrangeChild(RadElement child)
The child element to check.
Returns:Whether the child will be arranged in ArrangeOverride.
Overrides:
Gets a value indicating, whether a child will be measured during the MeasureOverride.
protected override bool ShouldMeasureChild(RadElement child)
The child.
Returns:Whether the child will be measured in MeasureOverride.
Overrides:
Temporarily suspends viewport updates to improve performance during multiple operations.
public void SuspendViewportUpdate()
Removes any frozen panes from the worksheet, allowing all rows and columns to scroll freely.
public void UnfreezePanes()
Updates the viewport to position the specified cell as the top-left visible cell.
public void UpdateToViewWithTopLeftCellIndex(CellIndex cellIndex)
The cell index to position at the top-left of the viewport.
Events
Occurs when the active presenter changes to a different worksheet presenter implementation.
public event EventHandler ActivePresenterChanged
Occurs when a filter menu popup has been opened and is displayed to the user.
public event FilterMenuPopupOpenedEventHandler FilterMenuOpened
Occurs when a filter menu popup is about to open, allowing for customization of the filter options.
public event FilterMenuPopupOpeningEventHandler FilterMenuOpening
Occurs when a hyperlink within a worksheet cell is clicked by the user.
public event EventHandler<SpreadsheetHyperlinkClickedEventArgs> HyperlinkClicked
Occurs when the horizontal or vertical scroll mode changes.
public event EventHandler ScrollModeChanged