TX Sheet Control

TXSheetControlTagHelper Class

Class
Namespace
TXTextControl.TXSheetControl.AspNetCore
Package
TXTextControl.TXSheetControl.AspNetCore from the private NuGet feed or the supplied NuGet folder
Assembly
TXTextControl.TXSheetControl.AspNetCore.dll
Install
dotnet add package TXTextControl.TXSheetControl.AspNetCore .NET 10 and later.
Inherits
  1. TagHelper
  2. TXSheetControlTagHelper

Renders a browser editor and includes its deferred scripts once per request. Editor styles are bundled and isolated inside Shadow DOM.

Syntax

public class TXSheetControlTagHelper

Interfaces: ITagHelper, ITagHelperComponent.

Members

Constructors

ConstructorDescription
Constructor

Properties

PropertyDescription
Height
Options
ViewContext

Methods

MethodDescription
ProcessRenders the host and inert configuration, plus shared assets on the first editor in this request.

Examples

Configure a localized invoice editor and pass these options to the Razor tag helper below. Razor creates and runs the tag helper; application code does not need to call Process manually. The helper includes its styles and scripts automatically.

using TXTextControl.TXSheetControl.AspNetCore;

TXSheetControlOptions CreateInvoiceEditorOptions()
{
    var options = new TXSheetControlOptions { Theme = "auto", Language = "de", Locale = "de-DE", Rows = 100, Columns = 20, Areas = new TXSheetControlAreas { Ribbon = true, FormulaBar = true, SheetTabs = true, StatusBar = true } };
    return options;
}
@using TXTextControl.TXSheetControl.AspNetCore
@addTagHelper *, TXTextControl.TXSheetControl.AspNetCore

@{
    var options = new TXSheetControlOptions { Theme = "auto", Language = "de", Locale = "de-DE", Rows = 100, Columns = 20, Areas = new TXSheetControlAreas { Ribbon = true, FormulaBar = true, SheetTabs = true, StatusBar = true } };
}

<tx-sheet-control options="options" height="600"></tx-sheet-control>

See Also