New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI editable TagHelper GridEditableSettingsTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("editable", ParentTag = "kendo-grid", TagStructure = TagStructure.NormalOrSelfClosing)]
[SuppressTagRendering]
public class GridEditableSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent, ITemplateComponent

Inheritance: objectTagHelperTagHelperChildBaseGridEditableSettingsTagHelper

Implements: ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-grid name="grid">
    <editable cancel-delete="Cancel">
    </editable>
</kendo-grid>

Constructors

Initializes a new instance of the GridEditableSettingsTagHelper class.

C#
public GridEditableSettingsTagHelper()

Properties

If confirmation is enabled the grid will display a confirmation dialog when the user clicks the "destroy" command button. If the grid is in mobile mode this text will be used for the cancel button.

C#
public string CancelDelete { get; set; }

If set to true the grid will display a confirmation dialog when the user clicks the "destroy" command button.Can be set to a string which will be used as the confirmation text.Can be set to a function which will be called, passing the model instance, to return the confirmation text.This and all Grid configuration properties can be set (enabled/disabled) after the grid has been initialized with the setOptions method.

C#
public bool? Confirmation { get; set; }

If set to true the grid will display a confirmation dialog when the user clicks the "destroy" command button.Can be set to a string which will be used as the confirmation text.Can be set to a function which will be called, passing the model instance, to return the confirmation text.This and all Grid configuration properties can be set (enabled/disabled) after the grid has been initialized with the setOptions method.

C#
public string ConfirmationHandler { get; set; }

Enables the display of a confirmation dialog when the user clicks the "destroy" command button and sets the string which will be used as the confirmation text

C#
public string ConfirmationMessage { get; set; }

If confirmation is enabled the grid will display a confirmation dialog when the user clicks the "destroy" command button. If the grid is in mobile mode this text will be used for the confirm button.

C#
public string ConfirmDelete { get; set; }

The position at which new data items are inserted in the grid. Must be set to either "top" or "bottom". By default new data items are inserted at the top.

C#
public string CreateAt { get; set; }

If set to true the user can delete data items from the grid by clicking the "destroy" command button. Deleting is enabled by default.

C#
public bool? Destroy { get; set; }

Enables or disables the configuration.

C#
public bool? Enabled { get; set; }

The editing mode to use. The supported editing modes are "incell", "inline" and "popup".

C#
public string Mode { get; set; }

If set to true the Grid will be initialized in read only mode. Users won't be able to add, remove or update records. Clicking on the edit, delete or add buttons will have no effect. In incell mode, clicking on the cell will not open it for editing.API methods are not affected by this configuration. Calling editRow and editCell will still put the cell/row in edit mode. Calling addRow and removeRow will add/remove the row.This property is useful in combination with the enableEditing and disableEditing methods. You can initialize the Grid as read only and enable editing later on.

C#
public bool? Readonly { get; set; }

The template which renders popup editor.The template should contain elements whose name HTML attributes are set as the editable fields. This is how the grid will know which field to update. The other option is to use MVVM bindings in order to bind HTML elements to data item fields.To change the size of the popup editor you can follow the approach outlined in this article.

C#
public string Template { get; set; }

The template which renders popup editor.The template should contain elements whose name HTML attributes are set as the editable fields. This is how the grid will know which field to update. The other option is to use MVVM bindings in order to bind HTML elements to data item fields.To change the size of the popup editor you can follow the approach outlined in this article. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string TemplateHandler { get; set; }

The template which renders popup editor.The template should contain elements whose name HTML attributes are set as the editable fields. This is how the grid will know which field to update. The other option is to use MVVM bindings in order to bind HTML elements to data item fields.To change the size of the popup editor you can follow the approach outlined in this article. This option expects the ID of the script element that contains the template.

C#
public string TemplateId { get; set; }

Represents a collection of templates defined for the component.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

The template which renders popup editor.The template should contain elements whose name HTML attributes are set as the editable fields. This is how the grid will know which field to update. The other option is to use MVVM bindings in order to bind HTML elements to data item fields.To change the size of the popup editor you can follow the approach outlined in this article. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent TemplateView { get; set; }

If set to true the user can edit data items when editing is enabled.

C#
public bool? Update { get; set; }

Configures the settings of the popup edit window.

C#
[HtmlAttributeNotBound]
public Dictionary<string, object> WindowSettings { get; set; }

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public Dictionary<string, object> Serialize()
Returns:

Dictionary<string, object>