We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

I want to perform save action on last row tab button click

Thread ID:

Created:

Updated:

Platform:

Replies:

119981 Aug 20,2015 04:59 AM Aug 21,2015 07:07 AM JavaScript 1
loading
Tags: ejGrid
Bharat Buddhadev
Asked On August 20, 2015 04:59 AM

I want example with angular js and mvc

For example I have three columns on grid 

I am doing tabbing on columns  on last column focus out 
I want to perform save action 

Is it possible ?

If yes, 
Please provide me example with angular js and mvc



Madhu Sudhanan P [Syncfusion]
Replied On August 21, 2015 07:07 AM

Hi Bharat,

Thanks for using Syncfusion products.

Query: “I am doing tabbing on columns  on last column focus out, I want to perform save action”

We can achieve your requirement using the below code snippet. In the below we bound a blur event on the grid element. Delegated event is used since the form elements will be added only on edit operation. The blur event is bound in the grid`s create event and on the focus out of the last form element, we have initiated the grid`s save operation using endEdit method in the event handler.


<div id="grid" ej-grid e-datasource="data" . . . .  e-create="onCreate">

        . . . .
</div>

angular.module("SampleApp", ["ejangular"])

            .controller("SampleController", function ($scope) {

                . . . .

                $scope.onCreate = function () {


                    //Register a blur event

                    this.element.on("blur", "input:last, .e-ddl:last", ej.proxy(function () {


                        //Initiate save operation in grid

                        this.endEdit();


                    }, this));


                };
            });



For your convenience we have created a simple sample with the above code snippet and the same can be find from the below link.

http://jsplayground.syncfusion.com/vimmpeyw

Please refer the below help links for endEdit method of grid.

http://helpjs.syncfusion.com/js/api/ejgrid#methods:endedit

Please let us know if you have any queries.

Regards,
Madhu Sudhanan. P

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;