I would like to know how to detect the change in ownership of an observable object in a grid when selecting a checkbox with knockoutjs. The code that I currently have is this way.
<div data-bind="kendoGrid:{data: asignados, columns:columns}"></div>
<script type="text/javascript>
var RecursosVm = function () {
var self = this;
self.columns = [
{
title : "",
field : "isChecked",
template: "<input type='checkbox' data-bind='checked: checkedAlert'/>"
},
{ title: "Código", field: "reC_CLIENTKEY" },
{ title: "Nombre", field: "reC_NOMBRE_COMPLETO" }
];
self.asignados = ko.observableArray([]);
self.disponibles = ko.observableArray([]);
self.checkedAlert = function() {
//aqui deberia capturar el objeto
};
self.moverDisponibles = function() {
//TODO:
}}
The problem is that selecting the checkbox does not change the value of the object or trigger the function and there is no way to recover the selected objects.