AJAX ListView not calling controller actions in .NET Core

3 posts, 0 answers
  1. Adam
    Adam avatar
    9 posts
    Member since:
    Jun 2016

    Posted 24 Jul 2016 Link to this post

    public class FavoritesController : Controller
            public IActionResult Favorites_Read([DataSourceRequest] DataSourceRequest request)

                return Json(listings.ToDataSourceResult(request));


        .DataSource(dataSource => dataSource
            .Model(model => model.Id(p => p.ID))
            .Create(update => update.Action("Favorites_Create", "Favorites"))
            .Read(read => read.Action("Favorites_Read", "Favorites"))
            .Update(update => update.Action("Favorites_Update", "Favorites"))
            .Destroy(update => update.Action("Favorites_Delete", "Favorites"))


    I've set a breakpoint at the beginning of Favorites_Read, but the action is not being hit. Any help would be greatly appreciated.

  2. Adam
    Adam avatar
    9 posts
    Member since:
    Jun 2016

    Posted 24 Jul 2016 in reply to Adam Link to this post

    I should mention that I am also not getting any javascript errors on load.
  3. Konstantin Dikov
    Konstantin Dikov avatar
    2466 posts

    Posted 27 Jul 2016 Link to this post

    Hi Adam,

    Can you please test the same without the Deferred and see if it will make any difference? If it does, please ensure that you are calling the DeferredScripts method as documented in the following help article:
    I am looking forward to your reply with the results.

    Konstantin Dikov
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top