For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > June 2008 > How to focus a cell of a gridview inside an UpdatePanel (AJAX)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to focus a cell of a gridview inside an UpdatePanel (AJAX)
foolmelon@hotmail.com

2008-06-11, 7:34 pm

Before AJAX, we were able to focus a cell in a gridview during a
fullpage postback. After putting the gridview inside an UpdatePanel,
we cannot focus a cell in this gridview anymore. Does anybody know if
it is possible to make such focus? Thanks!

Bill
Manish

2008-06-12, 4:58 am

Hello Bill,

I could not really understand, how you want to have focus in the cell of the
Grid. You can access the cell in the RowDataBound event and then set the
focus.

e.row.cell(0).focus()

Could you please send me the code snippet that you were using earlier to
focus on the cell in the grid, which does not seem to be working fine when
the Grid is in the UpdatePanel?

Regards,
Manish
www.ComponentOne.com

"foolmelon@hotmail.com" wrote:

> Before AJAX, we were able to focus a cell in a gridview during a
> fullpage postback. After putting the gridview inside an UpdatePanel,
> we cannot focus a cell in this gridview anymore. Does anybody know if
> it is possible to make such focus? Thanks!
>
> Bill
>

marss

2008-06-12, 8:46 am

On Jun 11, 10:49 pm, foolme...@hotmail.com wrote:
> Before AJAX, we were able to focus a cell in a gridview during a
> fullpage postback. After putting the gridview inside an UpdatePanel,
> we cannot focus a cell in this gridview anymore. Does anybody know if
> it is possible to make such focus? Thanks!
>
> Bill


Hi Bill,

Try this:
ScriptManager.GetCurrent(this.Page).SetFocus(cell);

Mykola
http://marss.co.ua - Casual ideas for web development
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com