Solved

It possible to give a radiobutton two values

Posted on 2008-10-01
4
237 Views
Last Modified: 2013-11-07
Hi,
I have a radiobutton list which I populate by a XML file into a dataset then populate the radiobutton list from the dataset

rbtnList. DataTextField = "text"
rbtnList.DataValueField = "Value"

but I want to add a third column and call it later Is this possible and if so how would I do it.
0
Comment
Question by:niall29
  • 2
  • 2
4 Comments
 
LVL 20

Expert Comment

by:informaniac
ID: 22613434
Not possible.

Why exactly are you looking for a third column?
0
 

Author Comment

by:niall29
ID: 22613465
I have a text field which obviously is the display on the radio button list
I have a value field which is an int which is saved to the Db as what type of letter was sent
but now I want another value to tell it where to get the necessary data
0
 
LVL 20

Accepted Solution

by:
informaniac earned 50 total points
ID: 22613485
when u r fetching the data

select valueFieldCol1 + '$' + valueFieldCol2 as valueField,textfield from tblName

Now when u r sending to the d/b u could something like this

for int field send rbList.SelectedValue.Split('$')[0];

and for the other send rbList.SelectedValue.Split('$')[1];

if u r using xml then $ won't work, replace it something else
0
 

Author Closing Comment

by:niall29
ID: 31501930
I like that idea, sometimes the answer is staring you in the face.
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

912 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

21 Experts available now in Live!

Get 1:1 Help Now