Solved

Databinding radio button

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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 …
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 tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

14 Experts available now in Live!

Get 1:1 Help Now