• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1793
  • Last Modified:

SetFocus() to an item in a radiobuttonlist

Hello Experts,

On button click, I need to be able to set the focus to an item in a radiobuttonlist.
Just can't seem to figure this out.

Thanks!
0
GRCHELPDESK
Asked:
GRCHELPDESK
1 Solution
 
Praveen VenuTechnical Project ManagerCommented:
Can you try this

Drop a panel on the form and put a RadioButtonList on the panel.  Then you set focus to the panel.        

SetFocus(this.PanelRadioList);
0
 
GiftsonDJohnCommented:
Can you try this.

ListItem selectedItem = radioButtonList.SelectedItem;
selectedItem.Attributes.Add("onload", "this.focus();");
0
 
GRCHELPDESKAuthor Commented:
Hello Everyone,
As it turns out, Praveenvenu's solution worked.  Honestly, I don't understand why.  Does setting focus to a container in effect set focus to the first item in the container?
GiftsonDJohn, thanks for the solution but looks like Praveenvenu got there first.
I appreciate all the help, thanks very much!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now