Solved

It possible to give a radiobutton two values

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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