Scrollview headaches

3 posts, 1 answers
  1. Ioan
    Ioan avatar
    36 posts
    Member since:
    Dec 2012

    Posted 12 Nov 2014 Link to this post

    Here is a jsbin:

    In second view there's a ScrollView which I want to initialize dynamically via a button.
    The problem is the ScrollView is unresponsive. You simply can't swipe through pages.
    But if I initialize it on view show, it works without a hitch.
    Please tell me what am I doing wrong...
  2. Answer
    Alexander Valchev
    Alexander Valchev avatar
    2895 posts

    Posted 14 Nov 2014 Link to this post

    Hi Ioan,

    The issue occurs because the widget is build after View is initialized. In that case the widget will not be able to automatically calculate its dimensions.
    The solution is to manually refresh it.
    var buttonclick = function () {
          dataSource: {
            data: [{ id: 1, name: "abc" }, { id: 2, name: "abccc" }, { id: 3, name: "abcc" }] },
            template: "${name}",
            contentHeight: "100%"

    I hope this information will help.

    Alexander Valchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Ioan
    Ioan avatar
    36 posts
    Member since:
    Dec 2012

    Posted 18 Nov 2014 in reply to Alexander Valchev Link to this post

    Yes, that worked! Thank you!  I had a hunch that might be the cause, but I didn't suspect a simple refresh would do the trick...
Back to Top