• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1727
  • 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

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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