6 Answers, 1 is accepted
0
Hello Jon Elster,
Please find the attached project illustrating how to achieve the desired functionality.
Hope this helps.
Regards,
Rosi
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Please find the attached project illustrating how to achieve the desired functionality.
Hope this helps.
Regards,
Rosi
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Jon
Top achievements
Rank 1
answered on 04 Nov 2008, 01:51 PM
Hi..
I doesn't appear to set the focus and place the cursor in TextBox1?
It runs fine... what I am I missing?
thanks
I doesn't appear to set the focus and place the cursor in TextBox1?
It runs fine... what I am I missing?
thanks
0
Hi Jon Elster,
The javascript code focusing the textbox control is registered in the SelectedIndexChanged event of RadComboBox:
Regards,
Rosi
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The javascript code focusing the textbox control is registered in the SelectedIndexChanged event of RadComboBox:
protected void radComboBoxLocation_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) |
{ |
string script = @"function FocusTxt() |
{ |
var txt = $get('TextBox1'); |
setTimeout(function() {txt.focus(); }, 100); |
} |
FocusTxt()"; |
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "focusTextBox", script, true); |
} |
Regards,
Rosi
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Jon
Top achievements
Rank 1
answered on 04 Nov 2008, 02:08 PM
When I run your sample - the texbox1 does not get focus
???
What am I missing?
thanks
???
What am I missing?
thanks
0
Hi Jon Elster,
I am sorry for the misunderstanding.
Could you please share what is the browser that you use? This project is tested with IE7 and FF2 and FF3.
If you use IE 6 you can change the timeout to 500 instead of 100 and try it again:
Regards,
Rosi
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I am sorry for the misunderstanding.
Could you please share what is the browser that you use? This project is tested with IE7 and FF2 and FF3.
If you use IE 6 you can change the timeout to 500 instead of 100 and try it again:
protected void radComboBoxLocation_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) |
{ |
string script = @"function FocusTxt() |
{ |
var txt = $get('TextBox1'); |
setTimeout(function() {txt.focus(); }, 500); |
} |
FocusTxt()"; |
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "focusTextBox", script, true); |
} |
Regards,
Rosi
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Jon
Top achievements
Rank 1
answered on 04 Nov 2008, 02:32 PM
Thanks that worked!