Hi
I've been struggling with KendoUI and AngularJS to get a list view to repeat (or attempting to use ng-repeat). Here is the StackOverflow I created in regards to the issue
http://stackoverflow.com/questions/37701918/kendoui-angular-datasource-will-not-repeat-or-display-telerik-platform
I not have a suspicion it may be the json returned from my DataSource and as such I may need to restructure it or work around it, if this is the case I do not mind restructuring the results.
Cheers
I'm building a mobile application using Phonegap and Kendo UI. I have 2 mobile listviews in my application, one list has only one element, and the other has about 100. I've noticed that when I tap the list with only the single item and drag down slightly, the click event on the list item won't fire, yet it still navigates to the next screen when this happens.
The template for my listview looks like this:
<script type="text/x-kendo-tmpl" id="list-template">
<div class="notice" data-id="\#id">
<a href="\#another-page">
<div class="table-cell">
<div class="notice-list-header">
<h3 class="notice-list-date">#:start_date#</h3>
</div>
<div class="notice-list-body">
<p class="list-meta">#:title#</p>
</div>
</div>
</a>
</div>
</script>
I think what's happening is because of the anchor tag in the template it still navigates to the page its supposed to, but because I have code in the click event to populate the page that the list item navigates to, I end up with a blank page because the click event hasn't fired.
I don't have this problem with the other listview that has several items, so my guess is that when a listview is scrolled kendo internally prevents the default behaviour of the list item, which in this case in an anchor tag.
I tried to work around this by removing the anchor from my template and then used navigate() in the click event of the list item, which does work, but when I do it this way, an extra click event is fired on the page that is navigated to so the first item on that page is automatically clicked.
Can I use the filterable attribute on a markup only list? I suspect the issue is that you will need a model, for the filter to work.
In this example, the list goes empty when trying to write in the filter input
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Kendo UI Snippet</title> <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.common.min.css"/> <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.rtl.min.css"/> <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.silver.min.css"/> <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.mobile.all.min.css"/> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://kendo.cdn.telerik.com/2016.1.412/js/kendo.all.min.js"></script> </head> <body> <div data-role="view"> <ul data-role="listview" data-filterable="true" data-style="inset"> <li>Foo</li> <li>Bar</li> </ul> </div> <script> new kendo.mobile.Application(); </script> </body> </html>
<
script
type
=
"text/x-kendo-template"
id
=
"feedTemplate"
>
<
div
style
=
"float:right"
>
>
</
div
>
<
img
class
=
"item-image"
src
=
"${ImageUrl}"
/>
<
h3
class
=
"item-title"
>${Title}</
h3
>
<
p
class
=
"item-description"
>${Description}</
p
>
<
a
href
=
"\\#"
data-role
=
"button"
class
=
"delete"
>Delete</
a
>
</
script
>
How can i achieve this?
I have tried with kendo drawing, but i haven't got it to work. Can someone provide me with a working example ?
Thank you.
I'm making an app using Kendo and need to make it Section 508 compliant and accessible. One of the issues i'm having is that when a user navigates to a new page after clicking on a ListView item, the focus needs to change to the top title bar, but that's not working when I use ListView. I tell the focus to change in the data-after-show method of each page. It works if I go to the page via a KendoMobileButton or Kendo Tab bar button, but not for a ListView item. Here is my data-after-show method:
function
setFocusToTop() {
//first, since header is dynamically generated,we need to find the current page title element.
var
id = app.view().wrapper[0].attributes[
'id'
].value;
var
newId = id +
"-hTitle"
;
//give it an ID so we're 100% sure we're only finding the right one...not necessary, but worth the attempt.
$(
'#'
+ id +
' .viewTitleStyle:visible'
).attr(
'id'
, newId);
//give it a tabindex since it's not an input control. this lets us focus it
$(
'#'
+ newId).attr(
'tabindex'
,
'-1'
);
$(
'#'
+ newId).focus();
}
And here are my templates for my listview:
<script type=
"text/x-kendo-template"
id=
"customListViewNoDescriptionTemplate"
>
<div class=
"km-listview-link noDesc"
role=
"button"
>
<div class=
"graphic-container"
><img class=
"item-photo"
src=
"${image}"
aria-hidden=
"true"
/></div>
<h3 class=
"item-title"
>${name}</h3>
</div>
</script>
And here is how I create/bind the listview with that template:
$(
"#myHome-listview"
).kendoMobileListView({
dataSource: myDataSource,
template: $(
"#customListViewNoDescriptionTemplate"
).html(),
click: listViewLinkClick
});
I'm testing using Cordova on an iPhone using iOS9+ with VoiceOver turned on. Does anyone have any advice as to how to modify my ListView binding or template so that the focus event will work?
Hi,
When trying google's list view (https://material.angularjs.org/latest/demo/virtualRepeat) it feels very smooth and responsive.
It feels like the scroll speed is determined by the swipe speed. (when swiping fast the scroll moves very fast).
Is there any way to control the scroll speed when user scroll down (or up) by swiping,
Currently when there are lots of items it takes a lot of time to scroll to the bottom of the list (as opposed to googles list)
Thx
Sagi