Solved

SetFocus() to an item in a radiobuttonlist

Posted on 2009-07-09
3
1,492 Views
Last Modified: 2012-05-07
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
Comment
Question by:GRCHELPDESK
3 Comments
 
LVL 15

Accepted Solution

by:
Praveen Venu earned 500 total points
ID: 24820680
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
 
LVL 14

Expert Comment

by:GiftsonDJohn
ID: 24820935
Can you try this.

ListItem selectedItem = radioButtonList.SelectedItem;
selectedItem.Attributes.Add("onload", "this.focus();");
0
 
LVL 2

Author Comment

by:GRCHELPDESK
ID: 24822620
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now