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

Update function in telerik grid

0 Answers 57 Views
Telerik Trainer
This is a migrated thread and some comments may be shown as answers.
Sandeep
Top achievements
Rank 1
Sandeep asked on 05 Apr 2013, 05:10 AM
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)

          )

No answers yet. Maybe you can help?

Tags
Telerik Trainer
Asked by
Sandeep
Top achievements
Rank 1
Share this question
or