Hello
I have viewModel that is created from remote dataSource
this view model is bound to list:
Inside list there is nested sublist with is bound with:
Everything is working except one thing, I need to run some code after all list is finished loading and finished binding: I tried
on list element, but this is fired too soon, before sublist is bound.
When I add the same in place where sublist is bound, the even is not fired, becuase I beleive it si trying to find function inside nested element, not on root.
So my question is how to add event handler to dataBound event from viewModel (parent), or is there any event that is called when everything is bound, all parent and child items to listview?
Regards
Marcin
I have viewModel that is created from remote dataSource
var
viewModel = window.kendo.observable({
dataSource: data.dataSource,
dataBound:
function
() {
// do something
}
});
this view model is bound to list:
<
div
class
=
"list edit-form"
data-role
=
"listview"
data-source
=
"{ 'pageSize': 5 }"
data-bind
=
"source: dataSource"
data-auto-bind
=
"false"
data-template
=
"list-line-template"
>
</
div
>
<
div
class
=
"pager k-pager-wrap"
data-role
=
"pager"
data-source
=
"{ 'pageSize': 5 }"
data-bind
=
"source: dataSource"
data-auto-bind
=
"false"
>
Inside list there is nested sublist with is bound with:
<
div
class
=
"form-group-indent"
data-bind
=
"source: SubList"
data-template
=
"list-subline-template"
>
</
div
>
Everything is working except one thing, I need to run some code after all list is finished loading and finished binding: I tried
events: { dataBound: dataBound }
on list element, but this is fired too soon, before sublist is bound.
When I add the same in place where sublist is bound, the even is not fired, becuase I beleive it si trying to find function inside nested element, not on root.
So my question is how to add event handler to dataBound event from viewModel (parent), or is there any event that is called when everything is bound, all parent and child items to listview?
Regards
Marcin