Solved

Subclassing an Object

Posted on 2007-11-29
5
207 Views
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
radio1.databind
0
Comment
Question by:escheider
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:SQL_SERVER_DBA
ID: 20379563
I see where you having problems, check out the examples here http://www.markusegger.com/Articles/Article.aspx?quickid=050084
0
 
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!

Regards,
Mishu
0
 
LVL 4

Author Comment

by:escheider
ID: 20400209
Mishu:

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

Accepted Solution

by:
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:
http://www.codeproject.com/KB/cs/databindingwithattributes.aspx

Hope this helps!
Regards,
Mishu
0
 
LVL 4

Author Closing Comment

by:escheider
ID: 31411796
Exactly what I needed!  Thanks!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

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

13 Experts available now in Live!

Get 1:1 Help Now