Error from Edit button for ListView in edit mode, cannot Update either

2 posts, 0 answers
  1. Han Zhao
    Han Zhao avatar
    2 posts
    Member since:
    Sep 2015

    Posted 27 Sep 2015 Link to this post

     I am getting the following error when I am pressing the Edit button for the ListView. I am not sure why. The Data from the model appears and I can edit the input fields but it does not call the Update method on the controller.

     

    Uncaught SyntaxError: Unexpected identifier
    vt.getter @ kendo.all.min.js:9
    ut.extend.get @ kendo.all.min.js:11
    S.extend.get @ kendo.all.min.js:12
    E.widget.value.v.extend.init @ kendo.all.min.js:12
    b.extend.applyBinding @ kendo.all.min.js:13
    I.extend.bind @ kendo.all.min.js:13
    a @ kendo.all.min.js:12
    a @ kendo.all.min.js:12
    a @ kendo.all.min.js:12
    a @ kendo.all.min.js:12
    a @ kendo.all.min.js:12
    s @ kendo.all.min.js:12
    c.extend.refresh @ kendo.all.min.js:26
    c.extend.init @ kendo.all.min.js:26
    (anonymous function) @ kendo.all.min.js:10
    b.extend.each @ jquery.min.js:3
    b.fn.b.each @ jquery.min.js:3
    vt.plugin.e.fn.(anonymous function) @ kendo.all.min.js:10
    n.ui.DataBoundWidget.extend.edit @ kendo.all.min.js:33
    (anonymous function) @ kendo.all.min.js:33
    b.event.dispatch @ jquery.min.js:3
    b.event.add.v.handle @ jquery.min.js:3

     

    MVC Code for the ListView

    @(Html.Kendo().ListView<RPMS.Models.ActualsHoursViewModel>(Model)
        .Name("ListView")
        .TagName("div")
        .ClientTemplateId("ActualsHoursTemplate")
         
        .DataSource(dataSource => dataSource
            .Model(model =>
                {
                model.Id(m=>m.ActualsHoursModelsId);
                model.Field(m => m.ProjectId);
                model.Field(m => m.HoursAllocated);
                model.Field(m => m.Activities);
                }
            )
            .ServerOperation(true)
            .Batch(true)
            .Create(create => create.Action("kendo_Create", "ActualsHours"))
            .Read(read => read.Action("kendo_Read", "ActualsHours", new { date = "" }))
            .Update(update => update.Action("kendo_Update", "ActualsHours"))
            .Destroy(destroy => destroy.Action("kendo_Destroy", "ActualsHours"))
            .Events(events => events.Error("error_handler"))
             
        )
        .Editable()
        .Events(ev => {
            ev.DataBound("initDropDownLists");
            }
        )
        .Selectable()
               // .Events(events => events.Error("error_handler"))
     
    )
     

     

     

  2. Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 30 Sep 2015 Link to this post

    Hello,

    The provided information is not sufficient to determine what is causing the error. Could you also provide the display and editor templates and the dataBound handler so I can check the exact setup or a runnable sample that replicates the error?

    Regards,
    Daniel
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top