How to avoid jerky behaviour

Thread is closed for posting
4 posts, 0 answers
  1. selom
    selom avatar
    12 posts
    Member since:
    Nov 2010

    Posted 20 Apr 2013 Link to this post

    I'm using a databoundlistbox with a lot of images. I found that the template jumps while scrolling because some images load later than others. For example, images 5-10 will load, but if image 3 loads while looking at image 5 the list "jumps" to re-calculate the layout which is normal.

    Can I prevent the jerkyness if I already know the dimensions of image 3 before it actually loads? I found setting the width/height of the image does not help because the actual width/height in pixels is not the width/height of the image when it's in the container (shrunk to fit). Is there a way to extrapolating this value so I can force the container to be a certain size? Any tips would help.

    Edit: nm, setting the width/height on the wrong container
  2. Deyan
    Deyan avatar
    2147 posts

    Posted 22 Apr 2013 Link to this post

    Hi Selom,

    Just set the Width/Height of the layout container that holds the image element in your Item Template. If you do not have a layout container, put the Image element in a Grid and set the dimensions of the Grid element.

    Kind regards,
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. Anton
    Anton avatar
    1 posts
    Member since:
    Nov 2013

    Posted 23 Apr 2014 Link to this post

    I experience similar issue with databoundlistbox. Items have itemspanels inside and it's impossible to determine height of items at design time. I wonder if elegant solution exists?
  4. Deyan
    Deyan avatar
    2147 posts

    Posted 25 Apr 2014 Link to this post

    Hi Anton,

    Thanks for writing.

    If the size of the items cannot be determined at the point the containers are measured you will have to explicitly define a fixed size to avoid having your items change their size as soon as the picture is downloaded.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top