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

Editable ASP.Net MVC Kendo Grid Causes Page to Fail to Load

2 Answers 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 28 Jan 2014, 10:42 PM
I would like to do something similar to the Batch editing example found here: http://demos.telerik.com/kendo-ui/web/grid/editing.html

However, several pieces of the configuration cause my page to never finish loading.  Accessing the page will cause the loading icon to appear in the tab of my web browser, but the page never finishes.  The Index method of my page is hit, and returns the View, but the Read AJAX method is never called, and the display never updates.

Adding the following things to the configuration causes this issue for me:
in .Columns:
    columns.Command(command => command.Destroy()).Width(110);
.ToolBar(toolbar => {
            toolbar.Create();
            toolbar.Save();
        })
.Editable or
.Editable(editable => editable.Mode(GridEditMode.InCell))

For example, this produces a read-only grid:
@(Html.Kendo().Grid<AccountManagement.Business.ViewModels.Areas.DM.RehireDocumentSettingViewModel>()
                    .Name("DocumentSettings")
                    .Columns(columns => {
                            columns.Bound(ds => ds.FormID);
                            columns.Bound(ds => ds.DocumentDateTypeName);
                            columns.Bound(ds => ds.RemoveIfOlderThanDays);
                        }
                    )
                    .Navigatable()
                    .Sortable()
                    .Scrollable()
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .Batch(true)
                        .ServerOperation(false)
                        .Events(events => events.Error("error_handler"))
                        .Model(model => model.Id(ds => ds.FormID))
                        .Create("RehireDocumentSetting_Editing_Create", "RehireSetup")
                        .Read("RehireDocumentSetting_Editing_Read", "RehireSetup")
                        .Update("RehireDocumentSetting_Editing_Update", "RehireSetup")
                        .Destroy("RehireDocumentSetting_Editing_Destroy", "RehireSetup")
                    )
                )

And this produces the issue:
@(Html.Kendo().Grid<AccountManagement.Business.ViewModels.Areas.DM.RehireDocumentSettingViewModel>()
                    .Name("DocumentSettings")
                    .Columns(columns => {
                            columns.Bound(ds => ds.FormID);
                            columns.Bound(ds => ds.DocumentDateTypeName);
                            columns.Bound(ds => ds.RemoveIfOlderThanDays);
                        }
                    )
                    .Navigatable()
                    .Sortable()
                    .Scrollable()
                    .Editable()
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .Batch(true)
                        .ServerOperation(false)
                        .Events(events => events.Error("error_handler"))
                        .Model(model => model.Id(ds => ds.FormID))
                        .Create("RehireDocumentSetting_Editing_Create", "RehireSetup")
                        .Read("RehireDocumentSetting_Editing_Read", "RehireSetup")
                        .Update("RehireDocumentSetting_Editing_Update", "RehireSetup")
                        .Destroy("RehireDocumentSetting_Editing_Destroy", "RehireSetup")
                    )
                )

I don't get any error messages in Visual Studio or the browser, or any indication of what is going on.

Any help would be appreciated.

2 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 30 Jan 2014, 04:32 PM
Hello Brian,

I tried to reproduce the problem using the same configuration, but to no avail – everything is working as expected on our side. Could you please provide a runnable sample project where the issue is reproduced? This would help us pinpoint the exact reason for this behavior and advise you further.

Thank you in advance for your patience and cooperation.

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Brian
Top achievements
Rank 1
answered on 03 Feb 2014, 03:19 PM
I was unable to reproduce the issue on a clean project.  Working from both projects, I was finally able to locate the issue as an infinite loop in my server-side code.

Thanks,
Brian
Tags
Grid
Asked by
Brian
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Brian
Top achievements
Rank 1
Share this question
or