Hello,
I use MVVM to bind a ListView to my viewmodel and also the item template uses the MVVM pattern. The ListView dataBound event is binded to a function on my viewmodel.
The problem is that, when my dataBound function is called, the items exists, but are not yet binded to the data.
It appears that the item binding is triggered in the ListView.refresh function by calling the trigger('dataBound') function. There are actually 2 dataBound events, my event and an event of the binding system. And it appears my event is called first.
In my opinion it should be ensured that the binding event is always the first one executing.
I can workaround it by attaching my dataBound event after the binding of the ListView ( with listview.bind('dataBound', function (e) {...}) ), but that is against the MVVM pattern.
Regards, Jaap
I use MVVM to bind a ListView to my viewmodel and also the item template uses the MVVM pattern. The ListView dataBound event is binded to a function on my viewmodel.
The problem is that, when my dataBound function is called, the items exists, but are not yet binded to the data.
It appears that the item binding is triggered in the ListView.refresh function by calling the trigger('dataBound') function. There are actually 2 dataBound events, my event and an event of the binding system. And it appears my event is called first.
In my opinion it should be ensured that the binding event is always the first one executing.
I can workaround it by attaching my dataBound event after the binding of the ListView ( with listview.bind('dataBound', function (e) {...}) ), but that is against the MVVM pattern.
Regards, Jaap