469,950 Members | 2,061 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

datagrid control focus

i do a postback on a field within a dot.net datagrid (in editmode) and need
to set the focus to a specific field within the grid. Has anyone done this,
any suggestions?
Nov 18 '05 #1
1 1085
Ian,
This would be similar to setting focus on any control. Use
Page.RegisterStartupScript(..). On the ItemDataBoundEvent of the datagrid,
do a FindControl() to get the control you want to focus. Then you can
RegisterStartupScript and do a document.all[\"" + ctl.ClientID +
"\"].focus()

Best regards,
Jeffrey Palermo

"Ian Oldbury" <ian_oldbury@_NO_msn_SPAM_.com> wrote in message
news:Ol**************@TK2MSFTNGP14.phx.gbl...
i do a postback on a field within a dot.net datagrid (in editmode) and need to set the focus to a specific field within the grid. Has anyone done this, any suggestions?

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Mauro | last post: by
13 posts views Thread by pmcguire | last post: by
reply views Thread by Grant Smith | last post: by
reply views Thread by =?Utf-8?B?R2FyeSBX?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.