Solved

It possible to give a radiobutton two values

Posted on 2008-10-01
4
236 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

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