Update function in telerik grid

1 posts, 0 answers
  1. Sandeep
    Sandeep avatar
    2 posts
    Member since:
    Apr 2013

    Posted 05 Apr 2013 Link to this post

    Hi Iam implementing telerik grid in my asp.net MVC4 application. I have implemented the grid where select and delete functionality in working fine. But when i click on submit button update function in not triggering. Can anybody please tell me where i gone wrong? Please refer the code for telerik grid view given below.

    @(Html.Telerik().Grid<CustomerProductPriceModel>()
                .Name("Grid")
                .DataKeys(x =>
                            {
                                x.Add(y => y.Customer_Id);
                            })
                             .DataBinding(dataBinding =>
                            {
                                    dataBinding.Ajax()
                                    .Select("CustomerProductPriceList", "controller", new { productVariantId = Model.Id })
                                    .Update("CustomerPriceUpdate", "controller", new { productVariantId = Model.Id })
                                     .Delete("CustomerPriceUpdate", "controller", new { productVariantId = Model.Id });
                            })
                .Columns(columns =>
                {
                    columns.Bound(y => y.Customer_name).Width(200).ReadOnly();
                    columns.Bound(y => y.Price).Width(100);
    
                    columns.Command(commands =>
                    {
                        commands.Edit().Text(T("Admin.Common.Edit").Text);
                        commands.Delete().Text(T("Admin.Common.Delete").Text);
                    }).Width(180);
    
                })
                .Editable(x =>
                        {
                            x.Mode(GridEditMode.InLine);
                        })
                .EnableCustomBinding(true)
    
              )
Back to Top