Devextreme data-grid event handling with angularjs -


i have following data-grid definition:

<div ng-controller="testctrl">     <div dx-data-grid="{ bindingoptions: { datasource: 'model' },         paging: {             enabled: false         },         editing: {             editmode: 'row',             editenabled: true,             removeenabled: true,             insertenabled: true         },         columns: [{             datafield: 'name',             },             {             datafield: 'dateofbirth',             datatype: 'date'             },             {             datafield: 'note'         }],         oneditingstart:              function(e) {                 alert('editingstart');         },         onrowinserted:              function(e) {                 alert('rowinserted');         }     }"></div> </div> 

but syntax error. how handle events angular approach? haven't found code samples @ devextreme site.

you should not use event handler directly in markup. put controller:

$scope.editingstart = function(e){     alert("oneditingstart fired"); } 

then, update view:

<div dx-data-grid="{     <!-- data grid options... -->     oneditingstart: editingstart }  "></div> 

i've created sample here - http://jsbin.com/nijuvewure/edit?html,output


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -