This is a migrated thread and some comments may be shown as answers.

Setting Focus On Edit Column

4 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 22 Oct 2009, 03:52 PM
I have a grid using POPUP Edit Forms and when I close the edit form I want to set focus back to the Link that opened the POPUP Edit Form.

I am passing the Client ID of the Link and trying to set the focus.  It's not generating an error but it's also not setting the focus to that link either.

What's preventing this from working??

document.getElementById("RadGrid1_ctl00_ctl06_EditButton").focus();

4 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 23 Oct 2009, 01:49 PM
Anyone?

Can anyone shed some light on this?  I need to set focus on the Edit Column upon close of POPUP edit window and this is not working:

document.getElementById("RadGrid1_ctl00_ctl06_EditButton").focus();

0
Robert
Top achievements
Rank 1
answered on 23 Oct 2009, 01:53 PM
Anyone?

Can anyone shed some light on this?  I need to set focus on the Edit Column upon close of POPUP edit window and this is not working:

document.getElementById("RadGrid1_ctl00_ctl06_EditButton").focus();

0
Princy
Top achievements
Rank 2
answered on 26 Oct 2009, 12:38 PM
Hi,

By default on close of the edit popup the grid is refreshed. This may be the cause for the edit button  focus to be lost. You can test this by setting the background color of the edit column using javascript and check whether  this persists on popup close.

Thanks,
Princy


0
Robert
Top achievements
Rank 1
answered on 26 Oct 2009, 02:32 PM

No I am trying to set this after the refresh. Even if I put a button on the page and try to set focus to one of the grid link buttons it doesn't work.

document.getElementById("RadGrid1_ctl00_ctl06_EditButton").focus();

Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or