Subclassing an Object

Posted on 2007-11-29
Last Modified: 2013-11-26
Hello experts:

I am trying to implement a solution that will display a radiobuttonlist to the user that is populated from a dataset.  I am currently using the datavaluefield and datatextfield properties to utilize the specified column in the dataset; however, I'd like to add some addition attributes to each radio button in the list that are populated when the radiobuttonlist is bound to the dataset ..

I have already created a class and inherited the radiobuttonlist class, but I'm not sure where to go from here ... any help is greatly appreciated.

For example, I'd like to  attach 3 other pieces of data:

radio1.DataValueField = "id"
radio1.DataTextField = "displaycolumn"
radio1.SubscriberID = "subscriberID"  <--- new
radio1.GenKey = "consumergenkey" <--- new
radio1.CustCov = "custcovnumber" <--- new
Question by:escheider
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 16

Expert Comment

ID: 20379563
I see where you having problems, check out the examples here
LVL 11

Expert Comment

by:Mihai Stancescu
ID: 20394038
You can add them in the radio button Tag property as a enum or custom class, or you can create a new radio button component and add the 3 new properties.

Hope this helps!


Author Comment

ID: 20400209

Do you have an example and will attaching these new properties properly attach the specified column to that property?
LVL 11

Accepted Solution

Mihai Stancescu earned 500 total points
ID: 20401261
Does your radio button list has the DataSource member? If so it also has an event for binding?

Check this link, and see if this helps you:

Hope this helps!

Author Closing Comment

ID: 31411796
Exactly what I needed!  Thanks!

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor ( Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

705 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