Telerik Forums
Kendo UI for jQuery Forum
1 answer
164 views
Hello There,

We are using Kendo UI Mobile Scrollview for switching pages by swiping left or right. The only problem is that, the "vertical scrollbar" remains on the same position when a page is switched. We want to reset the vertical scrollbar to top when a new page is switched. We have tried using "$("#scrollSection").data("kendoMobileScrollView").refresh()", but it doesn,t work.  

It would help us huge, if there is any workaround for this issue.

Regards.
Petyo
Telerik team
 answered on 24 Oct 2013
6 answers
124 views
Hi Guys,

Need your help. I followed the example here http://demos.kendoui.com/mobile/scrollview/index.html#/ but unable to display the data in the mvvm.
I think i didn't setup the template the correctly? was able to setup a mvvm bind to listview successfully though.
Thanks.

var feedsModel= kendo.observable({
    feeds:[
{posttitle: "title1",
postcontent: "content1"},
{posttitle: "title2",
postcontent: "content2"},
],
    selectedpost:"none",
});
 <div data-role="view" id="post" data-layout="post-layout" data-title="Post" data-stretch="true" data-model="feedsmodel"></div>
 <div data-role="scrollview" 
        data-source="feeds" 
        data-template="scrollview-binding-template"
        data-content-height="100%"
        data-enable-pager="false">
    </div>
<script id="scrollview-binding-template" type="text/x-kendo-template">    <div> <p class="title">#: posttitle #</p></div></script>
Adrian
Top achievements
Rank 1
 answered on 11 Oct 2013
1 answer
73 views
Looks like there is some bug when you have a databound scrollview inside an scroller element, you cannot scroll between views and data is not shown correctly.
http://jsbin.com/AxEJuPI/2/edit

Am I doing something wrong?
If not, does someone know any fix that could be used right now?

I cannot put the scrollview as the first child element of the mobile view, as the listview may have other fields and the user would need to scroll to see them.
Alexander Valchev
Telerik team
 answered on 04 Oct 2013
0 answers
176 views
Just building a mobile web site and have various content pages that have gallery content on so will use a scroll view to display the data.

Not all pages will have a gallery and each gallery is different.

I dont want to have to create x number of datasources for each gallery and then have x number of views with the different scrollview and content in.

I want to create one datasource and assign the datasource to the scrollview at runtime called from a web service with different parameters based on what content page is being called.

So here's my view code:
<div data-role="view" data-layout="mobile-tabstrip" id="tabstrip-contentr" data-show="initcontent">
    <div class="content">
        <div id="cntpagehtml"></div>
        <div data-role="scrollview" data-autobind="false" id="my-scrollview"
        data-template="scrollview-binding-template"  data-enable-pager="true">
        </div>
        <script id="scrollview-binding-template" type="text/x-kendo-template">
             <div style="width:300px;">
            <div>
                <img src="/webimages/gallery/#: Image #" class="slider" /></div>               
                <div class="title">#= Caption #</div>
            </div>
        </script>
    </div>
</div>
I have set autobind to false and not given it a data source so it doesn't bind

Heres my call to get the data passing in the section 
function GetGallery(sectionid) {
    var _GalleryDS = new kendo.data.DataSource({
        transport: {
            read: {
                url: "mobiledata.asmx/GetGallery",
                dataType: "json",
                type: "POST",
                data: { SectionID: sectionid },
                contentType: "application/json; charset=utf-8"
            },
            parameterMap: function (data, operation) {
                data = $.extend({}, data);
                return JSON.stringify(data);
            }
        },
        serverPaging: true,
        pageSize: 30,
        schema: {
            data: "d[0].Items", total: "d[0].TotalItems"
        },
        change: function () {
            $("#my-scrollview").data('kendoMobileScrollView').refresh();
        }
    });
}
I now need to somehow assign the returned datasource in my data-show event code:
function initcontent(e) {
     
    var scroller = e.view.scroller;
    scroller.reset();
    GetContent("#cntpagehtml", e.view.params.p);
 
    var Section = 0;
    switch(e.view.params.p)
    {
        case "meet-the-team":
            GetGallery(3);
            //Assign the _GalleryDS to my scrollview......
            break;
        case "design-consultancy":
            GetGallery(6);
            //Assign the _GalleryDS to my scrollview......
            break;
        case "point-of-sale":
            GetGallery(4);
            //Assign the _GalleryDS to my scrollview......
             
            break;
        default:
    }
   
};

Anyone help, is it possible? or should i be doing it a different way?

Thanks

Jon.
Jon
Top achievements
Rank 2
Veteran
 asked on 02 Aug 2013
1 answer
44 views
Hi!
In the new version of Kendo Mobile Framework the kendoMobileScrollView ininitializes normally with data-role="scrollview" attribute ( http://jsfiddle.net/papageno/c8Hm6/10/ ), but when I try to initialize programmatically: $('#sv').kendoMobileScrollView(); ( http://jsfiddle.net/papageno/c8Hm6/9/ ) error occurs.

The error can be eliminated by changing the line:
that._content = options.dataSource ? new VirtualScrollViewContent(that.inner, that.pane, that.options) : new ScrollViewContent(that.inner, that.pane);
to line:
that._content = that.options.dataSource ? new VirtualScrollViewContent(that.inner, that.pane, that.options) : new ScrollViewContent(that.inner, that.pane);

Thank you!
Petyo
Telerik team
 answered on 02 Aug 2013
2 answers
170 views
Hi,
How cab I add a scroll view on the fly.
I tried the attached code but it doesn't really work
Can you help ?
Sagi
Petyo
Telerik team
 answered on 22 Jul 2013
2 answers
89 views
I am trying to use a template to render pages in a scroll view and I have run into some issues ...  I have a jsFiddle that shows what I am trying to do the group has a red header with 'why does this not work'.  I have a bunch of examples of things using templates and I don't understand why the template with the scroll view does not behave like the rest, could someone explain what I am missing?

http://jsfiddle.net/6RuHQ/6/

In case you are curious I am probably going to wind up with the last approach with my application since in some occasions I will end up with only 1 page and it looks silly as a scroller with 1 page (I'd rather just render that single page by itself).
Petyo
Telerik team
 answered on 10 Jul 2013
2 answers
50 views
Hello,

I have a custom mobile site that is using a hand-built mobile framework, but at the end of last year, we imported a kendo ScrollView into the site in order to have and improved image carousel.

This worked flawlessly, we simply called:
$(SELECTOR_HERE).kendoMobileScrollView();

This week, we attempted to update the site to the Q1 release (v2013.1.319 ) of the Kendo Framework, and found that this line has started throwing an error and no longer creates a carousel.

 After importing the non-compressed version of kendo mobile, I was able to track down the following:
MobileWidget = Widget.extend({
        ...
        ...
        container: function() {
            var element = this.element.closest(kendo.roleSelector("view layout modalview"));
            return kendo.widgetInstance(element, kendo.mobile.ui) || ContainerNullObject;
        }

After running the debugger, I can see that element is undefined, so I am assuming that kendo is now assuming that I am forcing the whole site to be a mobile app... which would be a ton of work to implement on this legacy site.

Has kendo officially stopped supporting individual initialization of the mobile components unless you are running the whole page as an app? (this would be very disappointing and greatly reduce the usefulness of the product for my company)

If not, can anyone tell me if the syntax changed or something in Q1?

Thanks!

Jim
Top achievements
Rank 2
 answered on 21 Jun 2013
2 answers
61 views
Hi guys,
  I am working with the ScrollView and trying to prevent users from scrolling to certain pages.  I created an event handler for changing.  According to the docs, there should be currentPage and nextPage numbers available in the event.  It appears that only the currentPage is available when I dump out the event object.  Can you help me out with this?

Using Q1 2013 release
Reference: http://docs.kendoui.com/api/mobile/scrollview#events-changing

Thanks!
Seth
Seth Morecraft
Top achievements
Rank 1
 answered on 03 Jun 2013
9 answers
198 views
I'm trying to implement a Scrollview that contains pages which in turn contain Scrollers, like this:

<div id="scrollview-container">
    <div data-role="scrollview" id="feed-scrollview">
        <div data-role="page" class="feed-item">
            <h2>header 1</h2>
            <p data-role="scroller">text to be scrolled</p>
        </div>
        <div data-role="page" class="feed-item">
         <h2>header 2</h2>
            <p data-role="scroller">other text</p>
        </div>
   more pages...
    </div>
</div>

The Scrollers become vertically scrollable/"swipeable" as expexcted, and the Scrollview is horizontally scrollable as expected, unless you try to swipe horizontally with the finger/pointer inside of the Scroller p-element. I.e., the scrollview works when swiping the header or the area around the Scroller.

Is it possible to achieve that when pointing/touching inside the Scroller, a vertical swipe will scroll the Scroller, and a horizontal swipe will scroll the scrollview? Or does anyone know a workaround/hack to make it work? 

Hope I'm expressing myself clear enough... it can get a little confusing with the similar terminology of scrollview/scroller...
Alexander Valchev
Telerik team
 answered on 23 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?