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

Fail contentHeight 100% in javascript ScrollView binding

1 Answer 48 Views
ScrollView (Mobile)
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 04 Dec 2013, 02:51 PM
I'm trying to make a 100% height scrollview. If I make it using html attributtes (<data-role="scrollview" data-source="_500pxBatchDS"  data-template="scrollview-batch-template" data-items-per-page="4" data-content-height="100%" data-enable-pager="false">) it works right.

But I bind it using javascript functions seems that do nothing. You can see it in this example if you change the height style in batch-page to 100% at this sample:
http://jsbin.com/ULiwADU/2/edit

How can I make it works?

Thanks

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 05 Dec 2013, 01:44 PM
Hi David,

You should initialize the widget at the init event of its parent View. In other words the onInit function should be executed on init event of the View.
For your convenience I updated the jsBin sample:

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ScrollView (Mobile)
Asked by
David
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or