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

Grid Edit command not firing

2 Answers 128 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Martin Ennemoser
Top achievements
Rank 1
Martin Ennemoser asked on 06 Nov 2013, 05:06 PM

Hi,

I am unsing Kendo with MVC 5. I am binding my Grid over Ajax. Reading works fine, but the controller method is never called. (see project attached)

thanks

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Customer_Update([DataSourceRequest] DataSourceRequest request, CustomerViewModel customer)
{
if(customer != null && ModelState.IsValid)
{

}
return Json(new[] { customer }.ToDataSourceResult(request, ModelState));


@(Html.Kendo().Grid<Rainbow.ViewModels.CustomerViewModel>()
    .Name("CustomersGrid")
    .Events(events => events.DataBound("onDataBound").DataBinding("onDataBinding").DetailInit("onDetailInit"))
    .Columns(c =>
    {
        c.Bound(i => i.Number).Title("Number");
        c.Bound(i => i.CompanyName).Title("Name");
        c.Command(command => command.Edit());
    })
    .Editable(editable => editable.Mode(GridEditMode.InLine))
        .DataSource(d => d.Ajax()
            .Events(events => events.Error("error_handler"))
            .Model(model => model.Id(c => c.Id))
            .Read(r => r.Action("CustomersGridData", "Customer"))
            .Update(r => r.Action("Customer_Update", "Customer")))        
    .Sortable()
    .Filterable()
    .Pageable())



25 Oct (Link to this post)

Hi,

I am unsing Kendo with MVC 5. I am binding my Grid over Ajax ( see attached project and code below). I receive the Date for the LastModified column 
with the Json result but the date is not displayed. 
I have already made another project with kendo with a similar setup and everything worked perfectly

25 Oct (Link to this post)

Hi,

I am unsing Kendo with MVC 5. I am binding my Grid over Ajax ( see attached project and code below). I receive the Date for the LastModified column 
with the Json result but the date is not displayed. 
I have already made another project with kendo with a similar setup and everything worked perfectly

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 07 Nov 2013, 10:56 AM
Hello Martin,

I have examined the sample you have provided, however it seems that it function as expected on my end. I have made a short video, please take a look maybe I'm missing something obvious.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Martin Ennemoser
Top achievements
Rank 1
answered on 07 Nov 2013, 11:37 AM
Thanks, we tried in no another machine and there it works.

So I guess it's a typical case of "works NOT on my machine" ;)

Regards,
Martin
Tags
Grid
Asked by
Martin Ennemoser
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Martin Ennemoser
Top achievements
Rank 1
Share this question
or