Kendo UI ListView is fail to appear on browser

2 posts, 0 answers
  1. sapan
    sapan avatar
    3 posts
    Member since:
    Oct 2012

    Posted 16 Nov 2012 Link to this post

    Hi

    I have written following code inside the View.

    Razor View:
    <div id="wrapper">
                <div class="SettingArea">
                    @foreach (ModuleLinkViewModel moduleQuickLink in ViewBag.ModuleLinks as List<ModuleLinkViewModel>)
                    {
                        <script type="text/x-kendo-tmpl" id="template">
                            <dl>
                                 <div id="mainareaforsettingicons">
                                    <div id="trans_bg">
                                        <div id="white_bg">
                                            <div id="settingicon">
                                                <dd><a href="@(Url.Content("~/" + (moduleQuickLink.Link)))" target="_self">
                                        <img src="@(Url.Content("~/Content/themes/default/images/Settings/") + (moduleQuickLink.Icon))"  alt="@(moduleQuickLink.ToolTip)" border="0"/></a></dd>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="reflaction">
                                        <dt><label>@(moduleQuickLink.Title)</label></dt>
                                    </div>
                                </div>
                            </dl>                        
                        </script>                 
                    }
                    <div id="Configuration"></div>
                    @{(Html.Kendo().ListView<ModuleLinkViewModel>()
                        .Name("Configuration")
                        .TagName("div")
                        .Pageable()
                        .ClientTemplateId("template")
                        .DataSource(dataSource => dataSource
                            .Read(read => read.Action("Read", "Configuration"))
                            .PageSize(20)
                            )
                    ).Render();}
                </div>
                <div id="footer_line_grey">
                </div>
                <div id="footer_line_white">
                </div>
            </div>

    Controller :
     public ActionResult Index()
            {
                IEnumerable<ModuleLinkViewModel> moduleLinks = this.GetAllConfigSettings(string.Empty);
                ViewBag.ModuleLinks = moduleLinks;

                return this.View();
            }

            [OutputCache(Duration = 0, VaryByParam = "None")]
            public ActionResult Read([DataSourceRequest]DataSourceRequest request, string searchSettingKeyword)
            {
                IEnumerable<ModuleLinkViewModel> moduleLinks = this.GetAllConfigSettings(searchSettingKeyword);
                ViewBag.ModuleLinks = moduleLinks;


                return this.Json(moduleLinks.ToList().ToDataSourceResult(request));
            }

    Now the problem is that when I do run the solution I could not able to see the ListView appearing on the page. But as and when I am seeing it's View Source I do able to see that all the necessary rows are appearing inside.

    Can anyone please guide where am I doing mistake?

    Sapan
  2. sapan
    sapan avatar
    3 posts
    Member since:
    Oct 2012

    Posted 16 Nov 2012 Link to this post

    It would be highly appreciable if someone can reply to my issue as soon as possible.

    Thanks in advance.

    - Sapan
  3. Kendo UI is VS 2017 Ready
Back to Top