Solved

Databinding radio button

Posted on 2004-08-17
4
211 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

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

943 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

5 Experts available now in Live!

Get 1:1 Help Now