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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

I want to focus on particular cell on grid view

Thread ID:





120015 Aug 24,2015 11:14 AM UTC Aug 25,2015 09:45 AM UTC JavaScript 1
Tags: ejGrid
Bharat Buddhadev
Asked On August 24, 2015 11:14 AM UTC

Waiting for your previous reply 

I want to use Technology must be Angular JS and MVC

while performing validation If I  am getting error I want to focus on first row and first column of grid of textbox which is open row

So here what i want is to put focus on first row and first cell of grid which is open cell of grid

Thank you waiting for you quick reply.

Madhu Sudhanan P [Syncfusion]
Replied On August 25, 2015 09:45 AM UTC

Hi Bharat,

Thanks for using Syncfusion products.

Query: “while performing validation If I  am getting error I want to focus on first row and first column of grid of textbox which is open row”

We can achieve this requirement by registering a click event to the grid. Since the Jquery validation will perform out of box of the grid, we need to set the focus to the first element in the click handler registered, when the validation failed.

Please refer the below truncated code example.

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

        . . . .

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

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

                . . . .

               $scope.onCreate = function () {

                     this.element.on("click.ejgrid", ".e-rowcell,.e-tooltxt", ej.proxy(function (e) {

                        //Check for edit state and prevent click on edit element.

                        if (this.model.isEdit && $(e.currentTarget).closest("form").length == 0) {

                            $("#gridEditForm input")[0].focus();


                    }, this));


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


Please let us know if you have any query.

Madhu Sudhanan. P


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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