see the below code to do this:
var branch_dropdown_id = $("#branch_id").kendoDropDownList({
optionLabel:"--Select Branch--",
dataTextField:"name",
dataValueField:"branch_id",
dataSource:{
serverFiltering:true,
transport:{
read:{
dataType: "json",
type: "POST",
url: url
}
}
},
change:function(e){
$("#class_id").data("kendoDropDownList").enable();
$scope.branid = this.value();
var classid = $("#class_id").data("kendoDropDownList");
classid.dataSource.filter({
field: "branch_id",
value: this.value(),
operator: "eq"
});
classid.value(0);
}
}).data("kendoDropDownList");
var class_id = $("#class_id").kendoDropDownList({
autoBind:false,
optionLabel:"--Select Class--",
dataTextField:"class_name",
dataValueField:"class_id",
dataSource:{
serverFiltering:true,
transport:{
read:{
dataType: "json",
type: "POST",
url: url
}
}
},
change:function(e){
$("#section_id").data("kendoDropDownList").enable();
var sectionid = $("#section_id").data("kendoDropDownList");
sectionid.dataSource.filter({
field: "classid",
value: this.value(),
operator: "eq",
field1: "bnid",
value1: branch_dropdown_id.value(),
operator1: "eq"
});
sectionid.value(0);
}
});
var branch_dropdown_id = $("#branch_id").kendoDropDownList({
optionLabel:"--Select Branch--",
dataTextField:"name",
dataValueField:"branch_id",
dataSource:{
serverFiltering:true,
transport:{
read:{
dataType: "json",
type: "POST",
url: url
}
}
},
change:function(e){
$("#class_id").data("kendoDropDownList").enable();
$scope.branid = this.value();
var classid = $("#class_id").data("kendoDropDownList");
classid.dataSource.filter({
field: "branch_id",
value: this.value(),
operator: "eq"
});
classid.value(0);
}
}).data("kendoDropDownList");
var class_id = $("#class_id").kendoDropDownList({
autoBind:false,
optionLabel:"--Select Class--",
dataTextField:"class_name",
dataValueField:"class_id",
dataSource:{
serverFiltering:true,
transport:{
read:{
dataType: "json",
type: "POST",
url: url
}
}
},
change:function(e){
$("#section_id").data("kendoDropDownList").enable();
var sectionid = $("#section_id").data("kendoDropDownList");
sectionid.dataSource.filter({
field: "classid",
value: this.value(),
operator: "eq",
field1: "bnid",
value1: branch_dropdown_id.value(),
operator1: "eq"
});
sectionid.value(0);
}
});
No comments:
Post a Comment