Hi,
Using (trialling) Kendo UI v2014.2.1008
I'm wondering about how to implement a multi-select listview. I understand the web component has this capability, but it seems unsuitable when I read the listed caveats (no view transitions etc).
I was trying to use an template with a style binding together with the click event, so that when an item is clicked the row color/icon can be changed. I've tried variations of the following:
<
div
data-bind
=
"style: {color: selectAnimalsViewModel.rowColor}"
>#= text #</
div
>
where rowColor is simply a variable like this (for now - later to be a function): rowColor: '#0000ff'
Nothing I do with the style binding seems able to affect the listview item style though.
I've seen other posts where something like this was suggested:
e.item.find(
'.km-icon'
).removeClass(
'km-trash'
).addClass(
'km-add'
);
- this works, but it's not persistent, such then when I return to the page from elsewhere, the icon/style has reverted to the original one. I realize I can set this up manually when navigating to the page, but I was hoping for a more 'automatic' method.
Is what I'm trying possible? Is there a better method? You advice is greatly appreciated, thanks.
Additional info: the listview is being initialized in the view's init() method. Apologies for not having a more complete example.
Regards,
Steve