Solved

Databinding radio button

Posted on 2004-08-17
4
210 Views
Last Modified: 2010-04-23
Hai All,

I am newbie to VB .NET. I could data bind text boxes and combo box, not radio button. I am trying to data bind a radio button - home and work address. I found a link, after a long search, that works for me.

http://msdn.microsoft.com/msdnmag/issues/04/07/AdvancedBasics/default.aspx

The author created a RadioButtonList (that acts similar to a combo box). Please download the code at the top of the article.

My question is the following:
In Form1, I see buttons and label in the design view. I see RadioButtonList1 control inside the "Button1_Click" event. I am wondering how author declared and created RadioButtonList1.

I see RadioButtonList1 being declared and initialized inside  "Windows Form Designer generated code ". I cannot modify that code using the code editor.

Is RadioButtonList1 created at run time? If so, how could I create one? I appreciate if you give me direction to go about it.

Thanks
0
Comment
Question by:karthikeyanTP
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:ptakja
ID: 11821949
RadiobuttonList is a user control.  You would need to add it to your toolbox.  To do that, right-click on your toolbox and select "Add/Remove Items..."  In the dialog that pops up, click the Browse button and browse to the dll for the RadioButtonList item you have.  When you are done, you should have a new item under the User Controls tab in your toolbox.

Drag it to a form and you will get the code generated as you have seen in the sample apps.

Jeff
0
 
LVL 2

Author Comment

by:karthikeyanTP
ID: 11822195
Hai,

I don't see any DLL file in any of the folder.

Thanks
0
 
LVL 14

Accepted Solution

by:
ptakja earned 50 total points
ID: 11822691
Hmmm....looks like the download contains the source code.  You may have to build it to get the dll.  The end result is a user control, inherited from a standard one.
0
 
LVL 2

Author Comment

by:karthikeyanTP
ID: 11823745
Thanks. I created a DLL file from it and it worked.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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…

707 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