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

MVC Grid: Scrollbar does not show initially

1 Answer 59 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Sam asked on 10 Jul 2017, 06:38 PM

I have a tabstrip that contains several tabs, each of which contains a grid. When the page loads and I go to the Messages tab, the grid displays the data correctly. But there is no scrollbar, even though there are many pages of data (see Initial.png).

Once I click on any page number, the scrollbar appears (see AfterPaging.png). After that, it works just fine. But I cannot get the scrollbar to appear at the beginning.

My tab strip looks like this:

<div id="TabsContainer">
    <div class="k-content" style="margin-top: 10px;">
                .Animation(animation => animation.Enable(false))
                .HtmlAttributes(new { @class = "TabStripContents MinerTabStripContents" })
                .Items(tabstrip =>
                    tabstrip.Add().Text("Accounts (0)")
                        .LinkHtmlAttributes(new { id = "SummaryTab" })
                    tabstrip.Add().Text("Errors (0)")
                        .LinkHtmlAttributes(new { id = "ErrorsTab" })
                    tabstrip.Add().Text("Parameters (0)")
                        .LinkHtmlAttributes(new { id = "ParametersTab" })
                    tabstrip.Add().Text("Messages (0)")
                        .LinkHtmlAttributes(new { id = "MessagesTab" })
                    tabstrip.Add().Text("Logs (0)")
                        .LinkHtmlAttributes(new { id = "LogsTab" })


The Messages tab strip is this:

        .TableHtmlAttributes(new { @class = "grid-with-padding", style = "width: 100%; border: solid 1px gray;" })
        .Columns(columns =>
            columns.Bound(a => a.MessageDate).Width(150).Title("Date").Format("{0:MM/dd/yyyy hh:mm tt}");
            columns.Bound(a => a.AccountID).Width(100).Title("Account ID");
            columns.Bound(a => a.Step).Width(300);
            columns.Bound(a => a.ResultMessage).Width(300).Title("Text");
        .Scrollable(scroll => scroll.Virtual(true))
        .DataSource(dataSource => dataSource
            .Read(read => read.Action("ReadMessages", "Miner").Data("GetMinerProcessDataAndSendAntiForgery"))
        .Events(ev => ev.DataBound("OnMessagesDataBound"))
        .HtmlAttributes(new { @class = "TabContents MinerTabContents" })
        .NoRecords("There are no messages for this miner process")


The OnMessageDataBound function is empty, but the problem still happens.

I set the height of the MessagesGrid in  $(document).ready(), but the problem happens even if I comment that out.

Any  ideas on what I can do to make the scroll bar appear?


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 12 Jul 2017, 11:57 AM
Hello Sam,

Note that using paging and virtual scrolling at the same time will likely result in unexpected behavior. If you would like to use paging for the Grid you need to ensure that virtual scrolling is disabled.

Replace your scrollable configuration with the one from the code snippet below and let me know how the behavior changes.


If you would like more information on Virtual Scrolling you would find the article below interesting.

Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question