Sunday, August 30, 2015

pass more than one value to next kendodropdownlist by filter

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);
                }
            });

Switch PHP version in Ubuntu OS or Zorin OS

First check where is installed your PHP by the below command: $ which php See PHP version by below command: $ php -v As I've installed P...