3 Answers, 1 is accepted
0
Hi Ivan,
Try getting your text box when your edit item is created:
Best wishes,
Veli
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Try getting your text box when your edit item is created:
void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridEditFormItem && e.Item.IsInEditMode) |
{ |
(e.Item.FindControl("TextBox") as TextBox).Focus(); |
} |
} |
Best wishes,
Veli
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Emily Fong
Top achievements
Rank 1
answered on 23 Aug 2012, 05:57 AM
Hi,
I have a problem on setting focus on the textbox in RadGrid. I did as you said in ItemCreated. However, the textbox is focus random. Sometime, it can focus on the textbox but sometime not.
Any idea?
Thanks!
Best Regards,
Emily
I have a problem on setting focus on the textbox in RadGrid. I did as you said in ItemCreated. However, the textbox is focus random. Sometime, it can focus on the textbox but sometime not.
Any idea?
Thanks!
Best Regards,
Emily
0
Hello Emily,
I have created a sample RadGrid web site with Edit Form Template. On my side everything works as expected and the defined TextBox gets focused as expected. Please check out the attached application and try to distinguish the crucial differences between our projects.
Greetings,
Eyup
the Telerik team
I have created a sample RadGrid web site with Edit Form Template. On my side everything works as expected and the defined TextBox gets focused as expected. Please check out the attached application and try to distinguish the crucial differences between our projects.
Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.