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

How to detect Kendo Grid MVC initial binding on controller

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Luciano Kaesemodel
Top achievements
Rank 1
Luciano Kaesemodel asked on 30 Oct 2014, 01:19 PM

I have a Kendo grid :        

@(Html.Kendo().Grid<MyVm>().Name("grid").Columns(columns =>
      ...
    .DataSource(dataSource => dataSource
            .Ajax()
            .Model(model => model.Id(p => p.Id))
            .Read(read => read.Action("List", "MyController", new { id = Model.Id }).Type(HttpVerbs.Get)))

On my controller I have :   

public JsonResult List([DataSourceRequest] DataSourceRequest request, int id)
    {
         //if (FIRST/INITIAL LOADING) ?????
         ...
    }

How can I check on controller if its the initial loading/binding?

Thanks

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 03 Nov 2014, 08:35 AM
Hello Luciano,

There isn't a way of detecting whether this is the first request of the Grid whiting the controller. This controller method can also be requested from other parts of the application.

Regards,
Nikolay Rusev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Luciano Kaesemodel
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or