New to Telerik UI for WPFStart a free 30-day trial

Save Executed Event in RadSpreadsheet

Updated on Sep 15, 2025

Environment

ProductRadSpreadsheet for WPF
Version2024.3.924

Description

How to listen for the save file command of RadSpreadsheet for WPF.

Solution

To do this, you can subscribe to the UICommandExecuted event of the RadWorksheetEditor object.

C#
	RadWorksheetEditor editorCache = null;

	private void RadSpreadsheet_ActiveSheetEditorChanged(object? sender, EventArgs e)
	{
		var spreadsheet = (RadSpreadsheet)sender;
		if (editorCache != null)
		{
			editorCache.UICommandExecuted -= ActiveSheetEditor_UICommandExecuted;
		}
		if (spreadsheet.ActiveWorksheetEditor != null)
		{
			spreadsheet.ActiveWorksheetEditor.UICommandExecuted += ActiveSheetEditor_UICommandExecuted;
		}
		editorCache = spreadsheet.ActiveWorksheetEditor;
	}

	private void ActiveSheetEditor_UICommandExecuted(object? sender, Telerik.Windows.Controls.Spreadsheet.Commands.UICommandExecutedEventArgs e)
	{
		var editor = (RadWorksheetEditor)sender;
		if (editor.Commands.SaveFile == e.Command)
		{
		  // execute your code here
		}
	}
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support