+ Start a Discussion
shinerajbshinerajb 

How do i select rows in which radio button is clicked

in table i have six fields out of that i have three radio buttons for --Include,exclude,None. In one row only one will be active

Either -Include,exclude,None that is working.How do i get all the IDS which have include -button clicked and exclude--button clicked.At any point of time How do i know which all rows are included and which all rows are excluded.

Here is my code

 

<apex:pageBlock id="allcons">
<apex:pageblocktable id="allcons" value="{!AllAccounts}" var="accsd" rendered="{!NOT(ISNULL(AllAccounts))}">
<apex:column headerValue="File Names">
<apex:outputText value="{!accsd.display_file_names}"/>
</apex:column>
<apex:column headerValue="Company Nos">

<apex:outputText value="{!accsd.display_comp_nos}"/>
</apex:column>

<apex:column headerValue="CSV IDS">
<apex:outputText value="{!accsd.display_csv_ids}"/>
</apex:column>
<!-- Shine -->
<apex:column headerValue="duns">
<apex:outputText value="{!accsd.display_duns}"/>
</apex:column>

<apex:column headervalue="Include">
<apex:actionsupport action="{!selectcon}" event="onclick" rerender="consel,allcons">
<input type="radio" />
<apex:param name="display" value="{!accsd.display_duns}">
</apex:param></apex:actionsupport>
</apex:column>
<apex:column headerValue="Exclude">
<input type="radio" name="{!accsd.display_file_names}" />
</apex:column>

<apex:column headerValue="None">
<input type="radio" name="{!accsd.display_file_names}" />


</apex:column>
<apex:column headerValue="Delete">
<a href="#" onclick="Delete('{!accsd.display_file_names}')" style="color:red;" >X</a>
<apex:param name="delname" value="{!accsd.display_csv_ids}" />
</apex:column>
<!-- Shine -->
</apex:pageblocktable>

</apex:pageBlock>

Thanks in advance

 

 

Shine

Rahul SharmaRahul Sharma

Hi shinerajb,

 

One good option would be with use of wrapper class to bind the data.

Wrapper class documentation


punnoosepunnoose

I am having the same problem  in line 25 getConatacts() the   the value in the radio butoon or fromt he check box,radiobutton is not reflected there

public PageReference processSelected()

 for(cContact cCon : getContacts()) {

Punnoose