Datalist with RadioButtons question

H

Hrvoje Vrbanc

Hi all!

I have a DataList with fixed number of columns and variable number of rows
(depending of the number of rows in the database).
Now, I'd like to put a RadioButton control in every DataList cell (beside
the data displayed from the database), but in such a way that all the
RadioButtons belong to the same group, i.e. that only one of all those
RadioButtons could be checked at the same time.
Also, there would be a Button below the datalist that, when clicked, must
find the checked RadioButton and pass the parameter (some ID) to the Code
Behind.

I did my best (what is not much) but didn't manage to solve the problem. I
can't use the DataGrid because graphical requirements demand repeated
columns.

Thank you in advance!
Hrvoje
 
H

Hrvoje Vrbanc

Hi!
Yes, I set the GroupName property but it didn't work. However, I
circumvented the problem by using a dynamically created table instead of
DataList and it worked although I noticed some peculiarities, maybe due to
my own limitations: I couldn't add more than 1 control in 1 table cell,
resulting in doubling the number of table rows. Also, one RadioButton
control couldn't be added parallely in two tabe cells (I needed it because
of two repeat columns). Therefore I created two RadioButton controls, added
each to each table cell and gave both the same GroupName. It worked.

Hrvoje
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top