Kendo UI validation TagHelper SpreadsheetSheetRowCellValidationSettingsTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("validation", ParentTag = "cell", TagStructure = TagStructure.WithoutEndTag)]
[SuppressTagRendering]
public class SpreadsheetSheetRowCellValidationSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent, ITemplateComponent
Inheritance: objectTagHelperTagHelperChildBaseSpreadsheetSheetRowCellValidationSettingsTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
@{
string[] mergedCells = new string[] { "A1:E1" };
var from_1 = "AND(LEN(A3)>3, LEN(A3)<200)";
var from_4 = "AND(ISNUMBER(D3),LEN(D3)<14)";
var to = @"DATEVALUE(""1/1/1998"")";
}
<kendo-spreadsheet name="spreadsheet">
<sheets>
<sheet>
<rows>
<sheet-row>
<cells>
<cell>
<validation type="reject" datatype="custom" from="@from_4" allow-nulls="true" message-template="The value entered is not an valid phone number. Please enter numeric value with less than 14 digits." title-template="Phone validation error" />
</cell>
</cells>
</sheet-row>
</rows>
</sheet>
</sheets>
</kendo-spreadsheet>
Constructors
Initializes a new instance of the SpreadsheetSheetRowCellValidationSettingsTagHelper class.
public SpreadsheetSheetRowCellValidationSettingsTagHelper()
Properties
Specifies whether to allow null values.
public bool? AllowNulls { get; set; }
Defines the comparer type that is used to validate the cell value.
public string ComparerType { get; set; }
Defines the data type of the cell value.
[HtmlAttributeName("datatype")]
public string DataType { get; set; }
Defines a formula or a value that is used for the comparison process. Used as the only compare value if the comparer type does not require a second argument. Mandatory for validation to work.
public string From { get; set; }
Defines the hint message that will be displayed if the value is invalid.The template provides access to the following variables: from{0}; to{1}; fromFormula{2}; toFormula{3}; dataType{4}; type{5} or comparerType{6}.
public string MessageTemplate { get; set; }
Defines the hint message that will be displayed if the value is invalid.The template provides access to the following variables: from{0}; to{1}; fromFormula{2}; toFormula{3}; dataType{4}; type{5} or comparerType{6}. This option expects the name of a JavaScript function that will be called to return the template.
public string MessageTemplateHandler { get; set; }
Defines the hint message that will be displayed if the value is invalid.The template provides access to the following variables: from{0}; to{1}; fromFormula{2}; toFormula{3}; dataType{4}; type{5} or comparerType{6}. This option expects the ID of the script element that contains the template.
public string MessageTemplateId { get; set; }
Defines the hint message that will be displayed if the value is invalid.The template provides access to the following variables: from{0}; to{1}; fromFormula{2}; toFormula{3}; dataType{4}; type{5} or comparerType{6}. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent MessageTemplateView { get; set; }
A Boolean value which indicates if a button for selecting list items will be displayed (dataType set to list).
public bool? ShowButton { get; set; }
Configures the templates for the SpreadsheetSheetRowCellValidationSettings.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
Defines the hint title that will be displayed if the value is invalid.
public string TitleTemplate { get; set; }
Defines the hint title that will be displayed if the value is invalid. This option expects the name of a JavaScript function that will be called to return the template.
public string TitleTemplateHandler { get; set; }
Defines the hint title that will be displayed if the value is invalid. This option expects the ID of the script element that contains the template.
public string TitleTemplateId { get; set; }
Defines the hint title that will be displayed if the value is invalid. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent TitleTemplateView { get; set; }
Defines a formula or a value that is used for the comparison process. Will be used if the comparer type requires a second argument.
public string To { get; set; }
Methods
Adds the current TagHelper instance to its parent TagHelper.
protected override void AddSelfToParent(TagHelperContext context)
The TagHelper context.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
Serializes the defined templates.