- Home
- Forum
- ASP.NET Web Forms
- Set Focus on cell clicked to get to edit mode
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?
SIGN IN To post a reply.
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">
<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.
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.
Regards,
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. ( [email protected] )
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.
Regards,
M. Ganga
SIGN IN To post a reply.
- 5 Replies
- 4 Participants
-
SC Sybil Charles
- May 8, 2019 05:00 PM UTC
- May 24, 2019 10:29 AM UTC