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

Multiple calls to Controller action method?

1 Answer 316 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jonas
Top achievements
Rank 1
Jonas asked on 12 May 2017, 01:20 PM

Hi,

We are using the Grid widget for ASP.NET Core which uses AJAX calls to our ASP.NET Core MVC Controller action methods.

Why would the Read method result in multiple calls to the Controller action method?

 

                .DataSource(dataSource => dataSource
                    .Ajax()
                    .Events(e => e.RequestStart("onRequestStart"))
                    .Read(read => read.Action("ListCars", "CarController"))
                )

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 17 May 2017, 06:39 AM
Hello Jonas,

Usually, this will cause only one call to the server, unless there is custom logic on some of the Grid and the dataSource events, which may cause the additional calls:

http://demos.telerik.com/aspnet-core/grid/index

I noticed that the RequestStart event of the dataSource is also used, please check the logic executed on the event.

If the issue still occurs, please send a fully runnable example, and I will gladly assist.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Tags
Grid
Asked by
Jonas
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or