Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > SetFocus gridview control

Reply
Thread Tools

SetFocus gridview control

 
 
postings@alexshirley.com
Guest
Posts: n/a
 
      10-04-2006
Hi

I'm trying to set the focus to a textbox situated in the footer of a
gridview, when the page is loading. (note textbox is in a template).

So far I've got:
-------------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load

Page.SetFocus(gvPortfolio.FooterRow.FindControl("t xtName"))

End Sub
-------------------------------

Unfortunately this comes up with yellow screen of death:

"System.InvalidOperationException: The DefaultButton of 'form1' must be
the ID of a control of type IButtonControl."

Any ideas?

Thanks

Alex

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setfocus to control in Iframe Eric ASP .Net 0 08-24-2010 11:00 PM
Can SetFocus(control)...set a control to the center of the page... trint ASP .Net 4 09-22-2007 08:31 PM
How to SetFocus to an activex control when a dialog is prompted? Haobing Python 1 12-20-2005 04:07 AM
Any opinions of SetFocus Corporation? MCSD 0 07-07-2004 11:04 PM
SetFocus Jurjen de Groot ASP .Net 1 06-30-2003 04:29 PM



Advertisments