Solved

SetFocus() to an item in a radiobuttonlist

Posted on 2009-07-09
3
1,472 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

16 Experts available now in Live!

Get 1:1 Help Now