下面是我需要绑定到两个剑道下拉列表的数据源。一个用于 Program,另一个用于 IForm。我需要在下拉列表本身中完成过滤。
$scope.programIFormList = new kendo.data.DataSource({
data: [
{
Name: "Program1",
IsProgram: "true",
ProgramId: 1,
Status: 0,
PatientId: 1,
StartDate:"",
EndDate:""
},
{
Name: "Program2",
IsProgram: "false",
ProgramId: 2,
Status: 0,
PatientId: 1,
StartDate:"",
EndDate:""
}
]
});
下面是html代码:
<div class="col-lg-2 col-md-4 col-sm-4 col-xs-4">
<select id="patient" kendo-drop-down-list k-data-text-field="'Name'" k-data-value-field="'PatientId'" k-data-source="patientList" >
</select>
</div>
<div class="col-lg-2 col-md-4 col-sm-4 col-xs-4">
<select kendo-drop-down-list k-data-text-field="'Name'" k-data-value-field="'ProgramId'" k-data-source="programIFormList | filter:{IsProgram: true}" k-cascade-from="'patient'">
</select>
</div>
<div class="col-lg-2 col-md-4 col-sm-4 col-xs-4">
<select kendo-drop-down-list k-data-text-field="'Name'" k-data-value-field="'ProgramId'" k-data-source="programIFormList | filter:{IsProgram: false}" k-cascade-from="'patient'">
</select>
</div>
在这里,我正在尝试应用角度过滤器。但它不起作用。如何使用 Kendo Angular 实现这一点?