Re: Set focus inside a repeater by Christopher
Christopher
Thu Jul 13 06:41:39 CDT 2006
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.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"CGW" <CGW@discussions.microsoft.com> wrote in message
news:59E1AB63-D519-4356-A415-6B79E10BC12C@microsoft.com...
> Sorry... been out on vacation. We're using 1.1
> --
> Thanks,
>
> CGW
>
>
> "Christopher Reed" wrote:
>
>> Are you using 1.1 or 2.0?
>> --
>> Christopher A. Reed
>> "The oxen are slow, but the earth is patient."
>>
>> "CGW" <CGW@discussions.microsoft.com> wrote in message
>> news:84C95A3E-B20F-4897-B44D-D1B408F58BDE@microsoft.com...
>> > Didn't work. Focus, Focused, etc. don't seemed to be recogognized as
>> > members.
>> > --
>> > Thanks,
>> >
>> > CGW
>> >
>> >
>> > "Christopher Reed" wrote:
>> >
>> >> 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.
>> >>
>> >> --
>> >> Christopher A. Reed
>> >> "The oxen are slow, but the earth is patient."
>> >>
>> >> "CGW" <CGW@discussions.microsoft.com> wrote in message
>> >> news:FEF26119-421B-4E03-81C0-8F5537AEC0BE@microsoft.com...
>> >> > 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?
>> >> > --
>> >> > Thanks,
>> >> >
>> >> > CGW
>> >>
>> >>
>> >>
>>
>>
>>