All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
I want to show the data coming from web api by paginating in kendo grid?
Hello Sezer,
You could achieve the desired result as per the example below:
//View @(Html.Kendo().Grid<GridViewModel>() .Name("grid") ... .Pageable() //enable the paging .DataSource(dataSource => dataSource .WebApi() //configure the WebApi DataSource .Model(model => { model.Id(p => p.ProductID); // Specify the property which is the unique identifier of the model. }) .Read(read => read.Action("Get", "Product")) ) ) //Controller [Route("api/[controller]")] public class ProductController : Controller { // GET: api/values [HttpGet] public DataSourceResult Get([DataSourceRequest]DataSourceRequest request) //Get Method { return service.Read().ToDataSourceResult(request); } }
Check out the complete implementation in the online demo:
https://demos.telerik.com/aspnet-core/grid/webapi
If you have any questions, feel free to let me know.
Regards, Mihaela Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.