Hi,
I've got a short question regarding MVVM, ListView and Pager:
The template contains a ListView and a Pager, both initialized via data attributes:
<
div
id
=
"thumbnail-list"
data-role
=
"kendo.ui.ListView"
data-bind
=
"source:thumbs"
data-template
=
"template-thumbnails"
data-source
=
"{ 'pageSize': 52}"
></
div
>
<
div
id
=
"pager"
class
=
"k-pager-wrap"
data-role
=
"pager"
data-bind
=
"source:thumbs, events: { change: onChange }"
data-source
=
"{ 'pageSize': 52}"
></
div
>
Now I want to change the "buttonCount", but not quite sure how to do this. I've looked at how it works via JS initialization, but does it also work with data-attributes?
Trying to set it after initialization like this does not work:
var
pager = $(
"#pager"
).data(
"kendoPager"
);
if
(pager !=
null
){
pager.options.buttonCount = 3;
pager.refresh();
}
Thanks in advance,
Patrick