Hello,
I'm trying to make a grid with PopUp-Mode. Now I need a customized content for the editing-window. I know it is possible to define a "TemplateName" which directs to an EditorTemplate. But in this case I'm not allowed to use an EditorTemplate for different reasons.
I saw in other posts (eg: http://www.kendoui.com/forums/ui/grid/custom-popup-editor-with-additional-fields.aspx#MtaYNNFFv0aHX5-drisScg ) where the Grid was not initialized by the MVC-wrapper, that it is possible to define a template which uses a script (type="text/x-kendo-template") like the following:
So in my case I also want to use this kind of template for the editing-window.
Here is my Code of the Grid:
So what can I do to use a specific template-script? I can't use an EditorTemplate.
Thank you!
I'm trying to make a grid with PopUp-Mode. Now I need a customized content for the editing-window. I know it is possible to define a "TemplateName" which directs to an EditorTemplate. But in this case I'm not allowed to use an EditorTemplate for different reasons.
I saw in other posts (eg: http://www.kendoui.com/forums/ui/grid/custom-popup-editor-with-additional-fields.aspx#MtaYNNFFv0aHX5-drisScg ) where the Grid was not initialized by the MVC-wrapper, that it is possible to define a template which uses a script (type="text/x-kendo-template") like the following:
<script id="gridEditTemplate" type="text/x-kendo-template"> Content here</script>Here is my Code of the Grid:
@(Html.Kendo().Grid(Model.Amounts) .Name("MyGrid") .BindTo(Model.Amounts) .ToolBar(commands => commands.Create().Text("add")) .DataSource(dataSource => dataSource .Ajax() .Events(ev => ev.Change("onChange")) .Update("Update", "Special") .Destroy("Delete", "Special") .Create("Insert", "Special") .Model(model => { model.Id(p => p.ID); model.Field(p => p.Amount); model.Field(p => p.Type); }).ServerOperation(false)) .Columns(columns => { columns.Bound(p => p.Amount).Title("Amount"); columns.Bound(p => p.Type).Title("Type).Width(70); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(160); }) .Editable(editable => editable.Mode(GridEditMode.PopUp).CreateAt(GridInsertRowPosition.Bottom).Window(w => w.Title("Amounts: "))))So what can I do to use a specific template-script? I can't use an EditorTemplate.
Thank you!