如何在angularjs中编写devexpress组合框更改事件

时间:2017-01-04 06:06:55

标签: jquery angularjs asp.net-mvc devexpress

我在我的表单中有devexpress组合框,我想写一些关于角度变化的脚本, 但是我没有在角度组合中获得变化事件,我能够进入javascript

<div ng-app="myApp">
  <div ng-controller="myCntrl">
    <div>
      @Html.DevExpress().FormLayout(settings => { 
          GeneralFormTypesAPI _gftAPI = new GeneralFormTypesAPI();     
          settings.Name = "FormLayout1"; 
          settings.ColCount = 2; 
          settings.Items.Add(i => { 
              i.Caption = "Form Type"; 
              i.NestedExtensionType = FormLayoutNestedExtensionItemType.ComboBox;
              i.NestedExtensionSettings.Name = "formTypeCB"; 
              ComboBoxSettings combo = (ComboBoxSettings)i.NestedExtensionSettings; 
              combo.SelectedIndex = 0; 
              combo.Properties.ValueType = typeof(string); 
              combo.Properties.TextField = "TypeName"; 
              combo.Properties.ValueField = "ID"; 
              combo.Properties.DataSource = _gftAPI.GetGeneralFormTypeCB();          
              combo.Properties.EnableClientSideAPI = true; 
              combo.Properties.ClientSideEvents.SelectedIndexChanged = "function(s, e){HideGridviewColumn(s,e)}"; 
          }); 
       }).GetHtml()
    </div>
  </div>
</div>

HideGridviewColumn事件在普通的javascript中工作,但我想从角度

调用此事件

的javascript

<script>
    function HideGridviewColumn(s, e) {
       alert('am in');//am getting alert here
    }
</script>

$scope.HideGridviewColumn= function () {
   alert('sss');//am not getting alert here
}

0 个答案:

没有答案