Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • pradnya984shedge 2 posts 22 karma points
    Jul 01, 2021 @ 21:53
    pradnya984shedge
    0

    Telerik grid control in Umbraco CMS

    Hi , I have created Asp.net application with empty template. then i have added the UmbracoCms nuget package in the project. I have created PersonController as below:

    namespace IntelligentPlatform.WebUI.Controllers

    { public class PersonController : Umbraco.Web.Mvc.RenderMvcController

    {
        // GET: Person
        public override ActionResult Index(ContentModel model)
        {
            var person = new Person(model.Content);
            return CurrentTemplate(person);
        }
    
        public ActionResult Persons_Read([DataSourceRequest] DataSourceRequest request)
        {
            var data = Enumerable.Range(1, 30)
                .Select(index => new test1
                {
                    Firstname = "FirstName #" + index,
                    Lastname = "LastName #" + index,
                    Address = "Address #" + index,
                    City = "City #" + index
                });
    
            return Json(data.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
        }
    }
    

    }

    and created the view as below:

    @using Kendo.Mvc.UI; @{ Layout = "Master.cshtml"; ; }

    Kendo UI Grid

    @(Html.Kendo().Grid

    but when i am running application in Umbraco Cms it's displaying grid as blank row value.

Please Sign in or register to post replies

Write your reply to:

Draft