Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 78072

AJAX ListView not calling controller actions in .NET Core

$
0
0

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

            return Json(listings.ToDataSourceResult(request));
        }
    }

 

@(Html.Kendo().ListView<ListingDetails>()
    .Name("listView")
    .TagName("div")
    .ClientTemplateId("listingTemplate")
    .Pageable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(5)
        .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"))
    )
    .Deferred()
    )

 

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


Viewing all articles
Browse latest Browse all 78072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>