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

Kendo Mobile Scroll View fixed height

1 Answer 146 Views
HTML5, CSS, JavaScript
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Corey Mitchell
Top achievements
Rank 2
Corey Mitchell asked on 26 Mar 2015, 05:08 AM
I have implemented a horizontal slider listing several countries and some facts about them using the Kendo Mobile ScrollView like so:

var worldViewModel = kendo.observable({
    countries: countriesData
});
kendo.bind($("#view-world"), worldViewModel); //bind to page
 
var scrollview = $("#view-world-slider").kendoMobileScrollView();


It works, but I can swipe it vertically as well as horizontally. I only want it to slide horizontally. I have tried setting a fixed height on every element, but it doesn't seem to affect it. I compared my setup with your demo here: http://demos.telerik.com/kendo-ui/scrollview/index and
I seem to have a very similar setup, except I bind my slides using a Kendo Observable and my markup looks like this:

<div id="view-world-slider" class="countries" data-template="world-country-template" data-bind="source:countries"></div>


Can you recommend a configuration or css that will make my slider stop sliding vertically?

1 Answer, 1 is accepted

Sort by
0
Martin Yankov
Telerik team
answered on 30 Mar 2015, 10:54 AM
Hi,

Normally, the Kendo ScrollView scrolls only horizontally. Perhaps you have modified something, so that it can scroll vertically or I'm simply not understanding you correctly. What you can try is setting the contentHeight property to 100% like here: http://dojo.telerik.com/Ihonu. Other than that, you have not provided neither your template, nor your css rules, so I cannot reproduce your issue and investigate it. Please, provide these or better yet, open a support ticket and send us your project, so that I can take a look and suggest a solution.

I am looking forward to your reply.

Regards,
Martin Yankov
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
HTML5, CSS, JavaScript
Asked by
Corey Mitchell
Top achievements
Rank 2
Answers by
Martin Yankov
Telerik team
Share this question
or