[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Subclassing an Object

Posted on 2007-11-29
5
Medium Priority
?
224 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
[X]
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
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 2000 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

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

649 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