I have a list of select from observableArray, I when I choose a data in first select it will bind the data in next select. this is what it look like in my code.
html:
<tbody data-bind="foreach: Participants">
<tr>
<td data-bind="text: Name"></td>
<td>
<select data-bind="
options: $parent.AttendanceCodes,
optionsText: 'Text',
optionsValue: 'Value',
value:$parent.AttendanceCode,
optionsCaption: 'select',
event:{change: $parent.onchange_attendancecodes}">
</select>
</td>
<td>
<select class="reason" data-bind="options: $parent.AbsenceReasons,
optionsText: 'Text',
optionsValue: 'Value',
value: $parent.AbsenceReason"></select>
</td>
</tr>
</tbody>
knockoutjs
var viewModel = function(data){
var self = this;
self.AbsenceReasons = ko.observableArray([]);
self.AttendanceCodes = ko.observableArray(attendanceCodeList);
self.Participants = ko.observableArray(participantsData);
//event
self.onchange_attendancecodes = function(){
self.AbsenceReasons.removeAll();
self.AbsenceReasons(absenceReasonsList);
};
};