Hello, have Multiple DropDownList MVVM with same/shared DataSource. The problem is when selected a value from the earlier selected values get reset.
I tried having multiple as that even works. I also tried in this https://docs.telerik.com/kendo-ui/controls/editors/multiselect/troubleshoot/troubleshooting#selected-item-is-lost-when-bound-to-shared-datasource
That also Here is my code.
Inside Template:
<script id="SegmentSelectionGridRowTemplate" type="text/x-kendo-template" class="AirPricingDivScript"> <tr> <td> <label>#= data.SegmentDetailsToDisplay #</label> </td> <td> <input data-role="dropdownlist" data-value-primitive="true" data-text-field="AirRequestToDisplay" data-value-field="ReservationRequestItemId" data-bind="value: ReservationRequestItemID, source: SegList" /> </td> </tr></script>
<div data-role="grid" id="SegmentSelectionGrid" class="margin-top" style="margin-left: 0px;" data-bind="source: AirPNRViewModel.Segments" data-toolbar="<div><i class='fa fa-plane' aria-hidden='true'></i> <b>Flight Segment(s)</b> </div>" data-columns='[ { "field": "PNRSegment", "title": "PNR Segment","width":"220"}, {"field": "RequestRoute","title":"Request Route","width":"80"}]' data-row-template="SegmentSelectionGridRowTemplate"></div>
Script:
var viewModel = kendo.observable({SegList :[{"ReservationRequestItemId":1716,"AirRequestToDisplay":"SIN-LAD 03-06-2018"},{"ReservationRequestItemId":1716,"AirRequestToDisplay":"LAD-SIN 13-06-2018"},{"ReservationRequestItemId":1716,"AirRequestToDisplay":"SIN-BKK 02-06-2018"}],AirPNRViewModel:{ Segments: [{"ReservationRequestItemID":0,"SegmentDetailsToDisplay":"TG 410"},{"ReservationRequestItemID":0,"SegmentDetailsToDisplay":"ET 619"} ]