Worksheet Editor Dialogs
The RadWorksheetEditor class provides the Dialog property, which is of the type of WorksheetEditorDialogs. This class contains properties for each of the dialogs used in the RadSpreadsheet control.
The WorksheetEditorDialogs class contains the following properties:
HeaderFooterDialog—Gets or sets the header/footer dialog. To set a custom header/footer dialog, extend theHeaderFooterDialogContentclass.FormatShapesDialog—Gets or sets the format shapes dialog. To set a custom format shapes dialog, extend theFormatShapesDialogContentclass.SortingDialog—Gets or sets the sorting dialog. To set a custom sorting dialog, extend theSortingDialogContentclass.TopFilterDialog—Gets or sets the top10 filter dialog. To set a custom top10 filter dialog, extend theTopFilterDialogContentclass.CustomFilterDialog—Gets or sets the custom filter dialog. To set a custom custom filter dialog, extend theCustomFilterDialogContentclass.CustomSortListsDialog—Gets or sets the custom sort lists dialog. To set a custom custom sort lists dialog, extend theCustomSortListsDialogContentclass.DataValidationDialog—Gets or sets the data validation dialog. To set a custom data validation dialog, extend theDataValidationDialogContentclass.AlertDialog—Gets or sets the alert dialog. To set a custom alert dialog, extend theAlertDialogContentclass.ConfirmDialog—Gets or sets the confirm dialog. To set a custom confirm dialog, extend theConfirmDialogContentclass.StopDialog—Gets or sets the stop dialog. To set a custom stop dialog, extend theStopDialogContentclass.WarningDialog—Gets or sets the warning dialog. To set a custom warning dialog, extend theWarningDialogContentclass.InformationDialog—Gets or sets the information dialog. To set a custom information dialog, extend theInformationDialogContentclass.UnhideSheetDialog—Gets or sets the unhide sheet dialog. To set a custom unhide sheet dialog, extend theUnhideSheetDialogContentclass.InsertChartDialog—Gets or sets the insert chart dialog. To set a custom insert chart dialog, extend theInsertChartDialogContentclass.ManageConditionalFormattingDialog—Gets or sets the manage conditional formatting dialog. To set a custom manage conditional formatting dialog, extend theManageConditionalFormattingDialogContentclass.FormatFontDialog—Gets or sets the Format Font dialog. To set a custom Format Font dialog, extend theFormatFontDialogContentclass.ConditionalFormattingDialog—Gets or sets the new/edit conditional formatting dialog. To set a custom new/edit conditional formatting dialog, extend theConditionalFormattingDialogContentclass.PageSetupDialog—Gets or sets the page setup dialog. To set a custom page setup dialog, extend thePageSetupDialogContentclass.NameManagerDialog—Gets or sets the name manager dialog. To set a custom name manager dialog, extend theNameManagerDialogContentclass.DecimalNumberPromptDialog—Gets or sets the decimal number prompt dialog. To set a custom decimal number prompt dialog, extend theDecimalNumberPromptDialogContentclass.FormatCellsDialog—Gets or sets the format cells dialog. To set a custom format cells dialog, extend theFormatCellsDialogContentclass.InsertCellsDialog—Gets or sets the insert cells dialog. To set a custom insert cells dialog, extend theInsertCellsDialogContentclass.RemoveCellsDialog—Gets or sets the remove cells dialog. To set a custom remove cells dialog, extend theRemoveCellsDialogContentclass.ScaleFactorDialog—Gets or sets the scale factor dialog. To set a custom scale factor dialog, extend theScaleFactorDialogContentclass.SelectColorDialog—Gets or sets the select color dialog. To set a custom select color dialog, extend theSelectColorDialogContentclass.InsertFunctionDialog—Gets or sets the insert function dialog. To set a custom insert function dialog, extend theInsertFunctionDialogContentclass.StyleDialog—Gets or sets the style dialog. To set a custom style dialog, extend theStyleDialogContentclass.CreateNewThemeColorsDialog—Gets or sets the create new theme colors dialog. To set a custom create new theme colors dialog, extend theCreateNewThemeColorsDialogContentclass.ProtectDialog—Gets or sets the protect dialog. To set a custom protect dialog, extend theProtectDialogContentclass.UnprotectDialog—Gets or sets the unprotect dialog. To set a custom unprotect dialog, extend theUnprotectDialogContentclass.CreateNewThemeFontsDialog—Gets or sets the create new theme fonts dialog. To set a custom create new theme fonts dialog, extend theCreateNewThemeFontsDialogContentclass.SeriesDialog—Gets or sets the series dialog. To set a custom series dialog, extend theSeriesDialogContentclass.HyperlinkDialog—Gets or sets the hyperlink dialog. To set a custom hyperlink dialog, extend theHyperlinkDialogContentclass.FindAndReplaceDialog—Gets or sets the find and replace dialog. To set a custom find and replace dialog, extend theFindAndReplaceDialogContentclass.CreateUpdateSpreadsheetNameDialog—Gets or sets the create update spreadsheet name dialog. To set a custom create update spreadsheet name dialog, extend theCreateUpdateSpreadsheetNameDialogContentclass.SimpleConditionalFormattingDialog—Gets or sets the simple conditional formatting dialog. To set a custom simple conditional formatting dialog, extend theSimpleConditionalFormattingDialogContentclass.
Accessing the Dialogs
The RadSpreadsheet control provides the ActiveWorksheetEditor property that gives you access to the active worksheet editor. You can use this property to access the Dialogs property of the active worksheet editor and utilize the dialogs as needed.
Accessing the Dialogs
var findAndReplaceDialog = this.radSpreadsheet.ActiveWorksheetEditor.Dialogs.FindAndReplaceDialog;
Customizing the Dialogs
You can customize the dialogs by creating a new class that inherits from the dialog that you want to customize and override the necessary methods to implement your custom logic.
The following example showcases how to customize one of the properties provided by the WorksheetEditorDialogs class. It showcases how to introduce a custom FindAndReplaceDialogContent type for the FindAndReplaceDialog property. In the example, the OnKeyDown method is overridden to add custom logic for handling the Escape and Enter keys.
Extending the FindAndReplaceDialogContent
public class CustomFindAndReplaceDialogContent : FindAndReplaceDialogContent
{
public CustomFindAndReplaceDialogContent()
{
}
protected override void OnKeyDown(KeyEventArgs e)
{
if (e.Key == Key.Escape)
{
this.Close();
}
else if (e.Key == Key.Enter)
{
FindNextCommand.Execute(null);
}
}
}
Setting the CustomFindAndReplaceDialogContent
this.radSpreadsheet.ActiveWorksheetEditor.Dialogs.FindAndReplaceDialog = new CustomFindAndReplaceDialogContent();