Solved

Databinding radio button

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net WebRequest Code from JSON curl 7 50
.NET 2008 VB and C# 6 39
Access/Visual Basic Question 3 24
Toolbar to format all windows forms controls at design time needed 5 13
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
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…

839 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