Multiselect AngularJS on change event

2 posts, 0 answers
  1. Bertha
    Bertha avatar
    56 posts
    Member since:
    Aug 2012

    Posted 09 May Link to this post

    How do I add on change event to Multiselect and calling AngularJS function?  Thanks.

    $scope.typeOptions = {
    placeholder: "All Types",
    dataTextField: "Name",
    dataValueField: "ID",
    valuePrimitive: true,
    autoBind: false,
    dataSource: {
    transport: {
    read: {
    url: "api/facilitytype",
    }
    }
    }
    };

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 11 May Link to this post

    Hello Bertha,

    You can set the change option to a callback and call a $scope function from it:
    $scope.typeOptions = {
    change: function() {
      $scope.$apply(function() {
         //call $scope function or update a field
      });
    },
    placeholder: "All Types",
    dataTextField: "Name",
    dataValueField: "ID",
    valuePrimitive: true,
    autoBind: false,
    dataSource: {
    transport: {
    read: {
    url: "api/facilitytype",
    }
    }
    }
    };

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top