This is a migrated thread and some comments may be shown as answers.

Kendo UI ListView is fail to appear on browser

1 Answer 57 Views
ListView
This is a migrated thread and some comments may be shown as answers.
sapan
Top achievements
Rank 1
sapan asked on 16 Nov 2012, 11:59 AM
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

1 Answer, 1 is accepted

Sort by
0
sapan
Top achievements
Rank 1
answered on 16 Nov 2012, 01:05 PM
It would be highly appreciable if someone can reply to my issue as soon as possible.

Thanks in advance.

- Sapan
Tags
ListView
Asked by
sapan
Top achievements
Rank 1
Answers by
sapan
Top achievements
Rank 1
Share this question
or