Kendo UI editable TagHelper GridEditableSettingsTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("editable", ParentTag = "kendo-grid", TagStructure = TagStructure.NormalOrSelfClosing)]
[SuppressTagRendering]
public class GridEditableSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent, ITemplateComponent
Inheritance: objectTagHelperTagHelperChildBaseGridEditableSettingsTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-grid name="grid">
<editable cancel-delete="Cancel">
</editable>
</kendo-grid>
Constructors
Initializes a new instance of the GridEditableSettingsTagHelper class.
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.
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.
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.
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
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.
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.
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.
public bool? Destroy { get; set; }
The editing mode to use. The supported editing modes are "incell", "inline" and "popup".
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.
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.
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.
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.
public string TemplateId { get; set; }
Represents a collection of templates defined for the component.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
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.
public IHtmlContent TemplateView { get; set; }
If set to true the user can edit data items when editing is enabled.
public bool? Update { get; set; }
Configures the settings of the popup edit window.
[HtmlAttributeNotBound]
public Dictionary<string, object> WindowSettings { 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.