Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Set focus inside a repeater

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CGW - 06 Jun 2006 19:19 GMT
I'm using a repeater for editing, but having a devil of a time setting the
focus to a textbox inside the repeater. Does anyone have an example of how to
do this?
Signature

Thanks,

CGW

Christopher Reed - 12 Jun 2006 02:18 GMT
Try something like:

TextBox TextBox1 = (TextBox) Repeater1.FindControl("TextBox1");
TextBox1.Focus();

Since it is a repeater, you may have to go to the Row level before invoking
the FindControl method.

Signature

Christopher A. Reed
"The oxen are slow, but the earth is patient."

> I'm using a repeater for editing, but having a devil of a time setting the
> focus to a textbox inside the repeater. Does anyone have an example of how
> to
> do this?
CGW - 12 Jun 2006 14:54 GMT
Great! I had worked around it with tabindexing but I'll give this a shot.
Signature

Thanks,

CGW

> Try something like:
>
[quoted text clipped - 8 lines]
> > to
> > do this?
CGW - 16 Jun 2006 21:53 GMT
Didn't work. Focus, Focused, etc. don't seemed to be recogognized as members.
Signature

Thanks,

CGW

> Try something like:
>
[quoted text clipped - 8 lines]
> > to
> > do this?
Christopher Reed - 05 Jul 2006 12:23 GMT
Are you using 1.1 or 2.0?
Signature

Christopher A. Reed
"The oxen are slow, but the earth is patient."

> Didn't work. Focus, Focused, etc. don't seemed to be recogognized as
> members.
[quoted text clipped - 14 lines]
>> > to
>> > do this?
CGW - 12 Jul 2006 15:18 GMT
Sorry... been out on vacation. We're using 1.1
Signature

Thanks,

CGW

> Are you using 1.1 or 2.0?
> > Didn't work. Focus, Focused, etc. don't seemed to be recogognized as
[quoted text clipped - 15 lines]
> >> > to
> >> > do this?
Christopher Reed - 13 Jul 2006 12:41 GMT
Which explains things since my suggestions are for 2.0.  With 1.1, you'll
have to figure out what the control is and use a dynamically created
Javascript to set focus.  You can use something like the
Page.RegisterClientScriptBlock method to add your script dynamically.
Signature

Christopher A. Reed
"The oxen are slow, but the earth is patient."

> Sorry... been out on vacation. We're using 1.1
>
[quoted text clipped - 19 lines]
>> >> > to
>> >> > do this?
CGW - 13 Jul 2006 21:06 GMT
Thank you!
Signature


CGW

> Which explains things since my suggestions are for 2.0.  With 1.1, you'll
> have to figure out what the control is and use a dynamically created
[quoted text clipped - 23 lines]
> >> >> > to
> >> >> > do this?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.