Using HTMLInputRadioButton Control in a Datagrid

E

Elliot Rodriguez

Thanks for reading my post.

I have a requirement for the UI I am developing that necessitates I use
a radio button within each row of a DataGrid (dont ask, I was instructed
to do it this way). The radio button's value needs to be assigned a
value from a column in the grid's datasource.

I am having difficulty applying the value to the radio button.

It seems that if I leave the control as a plain HTMLInputRadioButton, I
cannot access the "value" attribute to assign my desired value - I get
an "Object reference not set to an object" error.

If I turn it into a server control, I can assign something to the value
attribute, but the radio button is assigned its own unique name (like
this: nameofthegrid_controlordinalnumber_thenameIwant), overwriting my
settings (specified both in the VS designer as well as in code). Since
the names are unique, the form now permits the user to select multiple
radio buttons.

My desired result - the user should only be allowed to select 1 radio
button out of the rows.

Any thoughts on how I can accomplish this?
 

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

Forum statistics

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

Latest Threads

Top