I am working with a kogrid that contains checkboxes in one column. There are two issues that I am facing:
- How can I retrieve row data when a checkbox is checked or unchecked?
- I have a save button located outside the kogrid. When this button is clicked, I want to submit the row values as a JSON object.
Here is the HTML code:
<div id="reconciliationGrid" data-bind="koGrid: reconciliationGridOptions"></div>
And here is the JavaScript code:
this.currentRowValues = ko.observableArray();
self.reconciliationGridOptions = {
data: self.reconciliationGrid,
canSelectRows: true,
afterSelectionChange: function () { return true; },
selecteditems: this.currentRowValues
};