This is a migrated thread and some comments may be shown as answers.

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

1 Answer 89 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Han Zhao
Top achievements
Rank 1
Han Zhao asked on 27 Sep 2015, 01:38 PM

 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"))
 
)
 

 

 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 30 Sep 2015, 07:31 AM
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
Tags
ListView
Asked by
Han Zhao
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or