+ Start a Discussion
Ankit SinghalAnkit Singhal 

radio button on apex:pageblocktable

Hi Guys,

 

Can we use radiobutton to select just one record in apex:pageblocktable.

<apex:pageblocktable value="{!Contacts}" var="d" id="contacts">
<apex:column headervalue="Select contact">
<apex:actionsupport action="{!selectcon}" event="onclick" rerender=" ">
<input type="radio" />
<apex:param name="conid" value="{!d.Id}">
</apex:param></apex:actionsupport>
</apex:column>

 

My problem here is that I am able to select multiplre records.

i just want to select one record with help of radio button.

 

kindly suggest something.

i dont want to use a checkbox.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Rahul SharmaRahul Sharma
Ankit Singhal, There is attribute named Name for html input tag. Which has a property to bind all the radio buttons with same names.
 
<input type="radio" name="selectRadio"/>

 

All Answers

Rahul SharmaRahul Sharma
Ankit Singhal, There is attribute named Name for html input tag. Which has a property to bind all the radio buttons with same names.
 
<input type="radio" name="selectRadio"/>

 

This was selected as the best answer
loveLearningloveLearning

thanks Rahul