I have two views that use the same data for different purposes (only showing the one with a problem below, they are basically the same thing). They each have a button group at the top and bottom of the list. The problem I have is when I scroll to the bottom of one of my groups such as the A-E group, then click one of the button group buttons to load another set, it can be quite a bit shorter and nothing shows in the view. I have to "double-click/drag" on the surface to get it to "come down" and show the list. So I have been trying to get the scroller reset to work. Scroller reset works fine in other areas of my app where the data-show function has access to the view. But the data-select from the button group does not seem to pass the view to the function. At least that is what I see from your sample code for button groups and data-select. So when I try to get the view in the function from data-select, it works for one of the views but not for the other. The one that does not work executes a data-show function from a different view, or rather it does the scroll work, but then also calls this unrelated function which renders a different view for another part of the app. The extra function it calls is mobileCompanyPackageDataBind which is for the view in the code below the one I am working with. If I use the Back button it shows the correctly scrolled alpha group I wanted, but there has got to be something wrong that it does this extra thing. What is going on and can I work around it?
EDIT:
I figured out a work around. I save the appropriate view similar to above but do the scroller and scroller.reset in the change event of the datasource. That seems to consistently work.
<
div
id
=
"servicerLeadFlow"
data-role
=
"view"
data-title
=
"Adjust Lead Flow"
data-show
=
"mobileLeadFlowDataBind"
style
=
"display:none"
>
<
ul
id
=
"leadFlowBtnGroup1"
data-role
=
"buttongroup"
data-index
=
"0"
data-select
=
"servicerLoadGroup"
>
<
li
>A-E</
li
>
<
li
>F-J</
li
>
<
li
>K-O</
li
>
<
li
>P-T</
li
>
<
li
>U-Z</
li
>
</
ul
>
<
ul
data-role
=
"listview"
data-style
=
"inset"
>
<
ul
id
=
"servicerLeadFlowView"
></
ul
>
</
ul
>
<
ul
id
=
"leadFlowBtnGroup2"
data-role
=
"buttongroup"
data-index
=
"0"
data-select
=
"servicerLoadGroup"
>
<
li
>A-E</
li
>
<
li
>F-J</
li
>
<
li
>K-O</
li
>
<
li
>P-T</
li
>
<
li
>U-Z</
li
>
</
ul
>
</
div
>
<
div
id
=
"listCompanyPackages"
data-role
=
"view"
data-title
=
"Company Packages"
data-show
=
"mobileCompanyPackageDataBind"
style
=
"display:none"
>
<
div
id
=
"divShowCompany2"
></
div
>
<
ul
data-role
=
"listview"
data-style
=
"inset"
>
<
ul
id
=
"companyPackageView"
></
ul
>
</
ul
>
</
div
>
function servicerLoadGroup() {
servicerGroup = this.current().index();
var view;
if (sevicerViewShown) {
view = $("#servicerOnOff").data("kendoMobileView");
setServicerGroupIndex();
}
if (leadFlowViewShown) {
view = $("#servicerLeadFlow").data("kendoMobileView");
setLeadFlowGroupIndex();
}
var scroller = view.scroller;
scroller.reset();
dsCompany.read();
}
EDIT:
I figured out a work around. I save the appropriate view similar to above but do the scroller and scroller.reset in the change event of the datasource. That seems to consistently work.