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. Image for the cookie policy date

Set Focus on cell clicked to get to edit mode

Is there a way to capture the cell clicked to enter edit mode and set the focus on that cell.  Currently a user clicks the row(cell) to go to edit mode and the cursor is in the first available edit field I believe I read this is as designed.  But I need to be able to place the cursor on the field (cell) they clicked on to get to edit mode.  Is this possible?

5 Replies

VN Vignesh Natarajan Syncfusion Team May 9, 2019 12:20 PM UTC

Hi Sybil, 
Thanks for contacting Syncfusion Support. 
Query#:- But I need to be able to place the cursor on the field (cell) they clicked on to get to edit mode. 
We have validated your query and achieved your requirement by “focusing the clicked column on editing” using ActionComplete and RecordDoubleClick events of ejGrid. We have retrieved the clicked cell index through getColumnByIndex in RecordDoubleClick event of the Grid. In the ActionComplete event of the Grid, we have focused the target cell. 
Please refer to the code example:- 
<ej:Grid ID="Grid" runat="server"> 
         <ClientSideEvents ActionComplete="Complete" RecordDoubleClick="click" /> 
    var index; 
       function complete(args){ 
         if (args.requestType == "beginedit") { 
            var column = this.getColumnByIndex(index);                    
            $("#" + this._id + column.field).parent().find("input").focus().select();  //find the input element and focus    
       function click(args) {   
        index = args.cellIndex;   //find the target index 
Refer to the documentation Link 
Please get back to us if you need any further assistance. 
Vignesh Natarajan. 

SC Sybil Charles May 9, 2019 05:18 PM UTC

Thank you that works perfectly.

VN Vignesh Natarajan Syncfusion Team May 10, 2019 03:30 AM UTC

Hi Sybil,  
Thanks for the update.  
We are glad to hear that your query has been resolved by our solution. 
Please get back to us if you have further queries. 
Vignesh Natarajan.  

LA Laura May 23, 2019 10:24 PM UTC

I'm Sgt Laura Ralph from USA, please write me via my mailbox is very important. ( sergeantlauraralph7@gmail.com )

GM Gangabharathy Murugasen Syncfusion Team May 24, 2019 10:29 AM UTC

HI Sgt Laura Ralph, 
If you need any assistance related to our Syncfusion control, then please create an incident under your DT account and post the query. Our team will assist you. 
M. Ganga  

Live Chat Icon For mobile
Up arrow icon