Select RadioButtonList Item via Databinding

C

CDARS

Dear all,

I understand that I can bind a DataSet to a RadioButtonList control
with properties DataTextField and DataValueField. ASP.NET will have
the ListItem objects generated. Nice.

Well consider this:
[Text],[Value],[Selected]
John, 1, 1
Amy, 2, 0
.......
[xxx], [x], 0

Is it possible to bind the [Selected] information to the
RadioButtonList? Of course I can select an item explicitly after data
binding. However when the [Selected] field is data-driven, I will be
looping the DataSet with conditional statements, OR I will be
retrieving the only ONE row for [Selected]=1. A step forward, I also
want to make use of the UpdateCommand available in DataBinding to
update the [Selected] field at DB.

Does it bother you too?
Any ideas?

Big Thanks!
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top