This is a migrated thread and some comments may be shown as answers.

viewModel not updating on checkbox selection

0 Answers 136 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Umesh
Top achievements
Rank 1
Umesh asked on 05 Apr 2012, 03:41 PM

Hi

We are working with the Kendo UI and are quite new to MVVM. We were trying out the following scenario and came across an issue which is as below.

We have a checkbox list on our page along with 2 listboxes (say listbox1 and listbox2).

The checkboxlist is a consolidated list of all the items from both the ListBoxes. Initially when no items are checked on the checkboxlist, all the items appear on the listbox1. The items when checked on the checkboxlist should move to listbox2 and should be removed from listbox1.

There is also a textbox and button ['Add Item'] using which we can add values to listbox1 (correspondingly these will appear as unchecked on the checkboxlist).

The problem:

The viewModel does not get refreshed on the check and uncheck events of the checkboxes. Because of this, the listboxes do not get updated with their  respective items.
However the viewModel refreshes the listboxes when a new item is added using the textbox and 'Add Item' button.

Please follow the JSFiddle link for code reference:  http://jsfiddle.net/umeshkrishna/eqWK2/9/

I am also attaching screen- shots as aides.

Looking  forward to a speedy reply.


Thanks
Umesh

 

 

 

 

 

 

 

 

 

 

No answers yet. Maybe you can help?

Tags
MVVM
Asked by
Umesh
Top achievements
Rank 1
Share this question
or