I have Kendo Mobile View which has three collapsible areas divs. I have an endless scrolling kendoMobileListView with in each with css overflow = auto. When I scroll it scrolls the whole view and not the listview within the div. The UI looks like this:
My markup for the view looks like:
<!-- Contact Search View-->
<div id="employee-contact-search-view"
data-role="view"
data-model="klas.contactSearchViewModel"
data-init="klas.contactSearchViewModel.initalizeContactSearch"
data-layout="drawer-layout"
data-title="Search Contacts">
<div style="text-align:center;">
<input id="contactSearchBox" type="search" placeholder="Enter Contact Name to Find" class="contactSearchInput" />
</div>
<div id="contactSearchResultsArea" class="contact-search-results-area-hidden">
<div class="search-collapose-buttom">
Provider Contacts
</div>
<div class="collapose-contact-area collapose-contact-area-open">
<div>
<ul id="providerContactListView" data-role="listview"></ul>
</div>
</div>
<div class="search-collapose-buttom">
Vendors Contacts
</div>
<div class="collapose-contact-area collapose-contact-area-closed">
<ul id="vendorContactListView" data-role="listview"></ul>
</div>
<div class="search-collapose-buttom">
Employees
</div>
<div class="collapose-contact-area collapose-contact-area-closed">
<ul id="employeeContactListView" data-role="listview"></ul>
</div>
</div>
</div>
My JavaScript to initialize the first endless scroll bar is:
var dataSource = new kendo.data.DataSource({
pageSize: 20,
page: 1,
serverPaging: true,
transport: {
read: {
url: klas.apiUrl + "/search/providers/",
dataType: "json"
},
parameterMap: function (options) {
debugger;
var parameters = {
searchString: $('#contactSearchBox').val(),
rowsPerPage: options.pageSize,
row: options.take,
};
return parameters;
}
},
schema: {
data: function (data) {
return data.Data;
},
total: function (data) {
return data.Count;
}
}
});
$("#providerContactListView").kendoMobileListView({
endlessScroll: true,
dataSource: dataSource,
template: $("#contact-search-list-template").text(),
scrollTreshold: 10
});
The CSS for the Div that should allow the user to scroll the list view looks like:
.collapose-contact-area-open {
display: block;
background-color: white;
border: 1px solid gray;
height: 63vh;
margin-left:2px;
margin-right:2px;
border-radius:0 0 4px 4px;
overflow:auto;
}
I want the view to be fixed and the multi views to scroll. Any Suggestions?
Have you tried setting the view to stretch?
<div id="employee-contact-search-view"
data-role="view"
data-stretch="true" ...
The docs say:
If set to true, the view will stretch its child contents to occupy the entire view, while disabling kinetic scrolling. Useful if the view contains an image or a map.