Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
505
Catching Add New Row for Validation in igniteui-angular
posted

How do I catch a new row before it's added to the data source in igniteui-angular? I tried using the event handing on my igGrid, but could not get it to work.

HTML:

    <ig-grid id="gridShopShifts"
                 data-source="shopShifts"
                 width="100%"
                 height="100%"
                 primary-key="ShiftKey"
                 auto-commit="true"
                 auto-generate-columns="false"
                 event-data-bind="shiftBindHandler()">
     .....
     </ig-grid>

Controller:

    $scope.shiftBindHandler = function () {
        console.log('Called Handler');
    }

Is this the proper way? Is there an easier way of handling this?

  • 505
    Verified Answer
    posted

    Figured it out myself.

    HTML:

        <ig-grid .... event-data-bind="shiftBindHandler">

    Controller:

        $scope.shiftBindHandler = function (e) {
            console.log('Called Handler');
        }