0

回答以下问题Kendo MVC ListView Editing

4

1 回答 1

0

Kendo in MVC uses a folder with the following path View/Shared/EditorTemplates inside this folder you must insert all the templates you call by name, example:

@(Html.Kendo().ListView<temp.Models.YourTable>(Model)
    .Name("LisView")
    .TagName("div")
    .ClientTemplateId("templateView") => here goes the template for data
    .DataSource(dataSource => dataSource
        .Model(m => m.Id("ID"))
        .ServerOperation(false)
        .Read(read => read.Action("ActionRead", "Controller"))
    )
    .Editable(edit => edit.TemplateName("EditTmpl")) 
)

EditTmpl => // this template is the one that you must store in the folder that I refer above.

hope this helps.

于 2014-04-03T21:47:33.597 回答