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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set Focus on cell clicked to get to edit mode

Thread ID:

Created:

Updated:

Platform:

Replies:

144489 May 8,2019 05:00 PM UTC May 24,2019 10:29 AM UTC ASP.NET Web Forms 5
loading
Tags: Grid
Sybil Charles
Asked On May 8, 2019 05:00 PM UTC

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?

Vignesh Natarajan [Syncfusion]
Replied On 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"> 
        <Columns> 
              ……………….    
              
         </Columns> 
         <ClientSideEvents ActionComplete="Complete" RecordDoubleClick="click" /> 
             … 
       </ej:Grid> 
 
  <script> 
    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 
       } 
 
</script> 
 
 
Refer to the documentation Link 
 
 
 
Please get back to us if you need any further assistance. 
 
Regards, 
Vignesh Natarajan. 
 


Sybil Charles
Replied On May 9, 2019 05:18 PM UTC

Thank you that works perfectly.

Vignesh Natarajan [Syncfusion]
Replied On 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. 
 
Regards, 
Vignesh Natarajan.  


Laura
Replied On 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 )

Gangabharathy Murugasen [Syncfusion]
Replied On 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. 
Regards, 
M. Ganga  


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.

Please sign in to access our forum

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon