SpreadsheetTagHelper
Kendo UI Spreadsheet TagHelper SpreadsheetTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-spreadsheet")]
[RestrictChildren("default-cell-style", new string[] { "excel", "pdf", "sheets", "toolbar" })]
[OutputElementHint("div")]
public class SpreadsheetTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperBaseSpreadsheetTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-spreadsheet name="spreadsheet" active-sheet="Sheet1"></kendo-spreadsheet>
Child Tags
Constructors
Initializes a new instance of the SpreadsheetTagHelper class.
public SpreadsheetTagHelper(IKendoHtmlGenerator generator)
Properties
The name of the currently active sheet. Must exactly match one of the (sheet names)[#configuration-sheets.name].
public string ActiveSheet { get; set; }
The default column width in pixels.
public double? ColumnWidth { get; set; }
The height of the header row in pixels.
public double? HeaderHeight { get; set; }
The width of the header column in pixels.
public double? HeaderWidth { get; set; }
An object containing any images used in the Spreadsheet. The keys should be image ID-s (they are referenced by this ID in (sheets.drawings)[#configuration-sheets.drawings]) and the values should be image URLs.The image URLs can be eitherdata URLs, in which case the images are fully contained by the JSON, or can be external URLs.Note that when external URLs are used, they should reside on the same domain, or the server must be configured with the properCORS headers, for the Spreadsheet to be able to fetch binary image data using a XMLHttpRequest. If it cannot fetch the image, export to Excel or PDF might not work.
public object Images { get; set; }
The name of the JavaScript function that will handle the change event. Triggered when a value in the Spreadsheet has been changed. Introduced in the 2016.Q1.SP1 release.
public string OnChange { get; set; }
The name of the JavaScript function that will handle the changeFormat event. Triggered when the range format is changed from the UI. Introduced in the 2017 Q1 release.
public string OnChangeFormat { get; set; }
The name of the JavaScript function that will handle the changing event. Triggered when a value or validation in the Spreadsheet is about to be changed upon user interaction.
public string OnChanging { get; set; }
The name of the JavaScript function that will handle the copy event. Fired when a range of a sheet is about to be copied.
public string OnCopy { get; set; }
The name of the JavaScript function that will handle the cut event. Fired when a range of a sheet is about to be cut.
public string OnCut { get; set; }
The name of the JavaScript function that will handle the dataBinding event. Fired when the data retrieved from a DataSource is about to be bound to a sheet. Available only if DataSource has been defined for at least one sheet.
public string OnDataBinding { get; set; }
The name of the JavaScript function that will handle the dataBound event. Fired when the data from a DataSource is already populated in a sheet. Available only if DataSource has been defined for at least one sheet.
public string OnDataBound { get; set; }
The name of the JavaScript function that will handle the deleteColumn event. Triggered when a column will be deleted. Introduced in the 2017 Q1 release.
public string OnDeleteColumn { get; set; }
The name of the JavaScript function that will handle the deleteRow event. Triggered when a row will be deleted. Introduced in the 2017 Q1 release.
public string OnDeleteRow { get; set; }
The name of the JavaScript function that will handle the excelExport event. Fires when the user clicks the Export to Excel toolbar button.
public string OnExcelExport { get; set; }
The name of the JavaScript function that will handle the excelImport event. Fired when the user imports a file after selecting it from the window prompt. The event is fired before the file importing has finished.
public string OnExcelImport { get; set; }
The name of the JavaScript function that will handle the hideColumn event. Triggered when a column will be hidden. Introduced in the 2017 Q1 release.
public string OnHideColumn { get; set; }
The name of the JavaScript function that will handle the hideRow event. Triggered when a row will be hidden. Introduced in the 2017 Q1 release.
public string OnHideRow { get; set; }
The name of the JavaScript function that will handle the insertColumn event. Triggered when a column will be inserted. Introduced in the 2017 Q1 release.
public string OnInsertColumn { get; set; }
The name of the JavaScript function that will handle the insertRow event. Triggered when a row will be inserted. Introduced in the 2017 Q1 release.
public string OnInsertRow { get; set; }
The name of the JavaScript function that will handle the insertSheet event. Triggered when a sheet is inserted. Introduced in the 2017 Q1 release.
public string OnInsertSheet { get; set; }
The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the Spreadsheet is focused.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnKendoKeydown { get; set; }
The name of the JavaScript function that will handle the paste event. Fired when a data is about to be pasted in a sheet.
public string OnPaste { get; set; }
The name of the JavaScript function that will handle the pdfExport event. Fired when the user initiates the export to PDF.
public string OnPdfExport { get; set; }
The name of the JavaScript function that will handle the removeSheet event. Triggered when a sheet will be removed. Introduced in the 2017 Q1 release.
public string OnRemoveSheet { get; set; }
The name of the JavaScript function that will handle the renameSheet event. Triggered when a sheet will be renamed. Introduced in the 2017 Q1 release.
public string OnRenameSheet { get; set; }
The name of the JavaScript function that will handle the render event. Triggered after the widget has completed rendering. The event will also fire when a cell is selected or when the Spreadsheet's tools (bold, italic) are used, as the target element is re-generated with new styles (e.g background-color, box-shadow, font-weight, etc.).
public string OnRender { get; set; }
The name of the JavaScript function that will handle the select event. Triggered when the Spreadsheet selection is changed. Introduced in the 2017 Q1 release.
public string OnSelect { get; set; }
The name of the JavaScript function that will handle the selectSheet event. Triggered when a sheet will be activated. Introduced in the 2017 Q1 release.
public string OnSelectSheet { get; set; }
The name of the JavaScript function that will handle the unhideColumn event. Triggered when a column will be shown. Introduced in the 2017 Q1 release.
public string OnUnhideColumn { get; set; }
The name of the JavaScript function that will handle the unhideRow event. Triggered when a row will be shown. Introduced in the 2017 Q1 release.
public string OnUnhideRow { get; set; }
A Boolean value which indicates if the sheets-bar will be displayed.
public bool? Sheetsbar { get; set; }
If set to true, the Spreadsheet formula parser will obey the decimal separator of the current culture. If set to false (default), the decimal separator in formulas will always be the dot.This flag has implications on how formulas are entered. When it is set to true, in cultures where the decimal separator is the comma (,), similar to Excel, the following additional changes upon entering a formula will occur: The semicolon will become a function argument separator. For example, =SUM(A1;A2) instead of =SUM(A1,A2). or The backslash will become an element separator in an array formula. For example, ={1\2;3\4} instead of ={1,2;3,4}.. This flag only affects the presentation - the way formulas are entered by the end user or displayed on screen. Serialization to JSON or XLSX as well as the public API functions will continue to use the dot as decimal separator and the comma as an argument separator (canonical form). For example, to apply a formula by using the API, even if useCultureDecimals is in effect, you still need to use the canonical form.
public bool? UseCultureDecimals { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: