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

Preventing ajaxStart() from firing when using endless scrolling

1 Answer 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 14 Jul 2014, 06:05 PM
My site has a spinner that shows on ajaxStart(). I want to disable this when having the ajax call coming from an endless scrolling grid. When using jquery natively and making an $.ajax() call there is a property called "global" that can be set to prevent your ajaxStart function from calling. Is there anyway to prevent the ajaxStart from calling using Kendo UI with ajax and mvc? Sample code is below.

Thanks,

Jim

.DataSource(d => d.Ajax().Read(r =>
         r.Action("Get", "Controller")
        .Type(HttpVerbs.Post)
        ).Filter(filters =>
        {
            filters.Add(a => a.Status).IsNotEqualTo("Test");
        })
        .Sort(sort =>
            {
                sort.Add(a => a.DisplyName).Ascending();
            }
        )
        .PageSize(30)
        .ServerOperation(true)
        )
    .Scrollable(s => s.Virtual(true))
    .Sortable()
    .Filterable()

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 16 Jul 2014, 11:37 AM
Hello James,

Using the MVC wrappers you are not able to configure the options of the Ajax request. Your only option would be to use pure JavaScript initialziation and declare the read operation as function. Inside of the function you can perform your own request.

http://docs.telerik.com/kendo-ui/api/framework/datasource#configuration-transport.read

Regards,
Petur Subev
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
Jim
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or