+ Start a Discussion

how to implement a selectcheckbox in a datatable column

I am trying to get dabatable with a column with checkboxes which should decide which row to pick from the data table; but I am always running in problems, because the checkboxes are created for each row, so i couldnt manage to get the value of  the checkbox which is selected:

<apex:dataTable value="{!ent}" var="contact" cellPadding="4" border="1" align="center">


<apex:selectRadio value="{!which}">

<apex:facet name="header">Ent_ID</apex:facet>

<apex:selectOption itemValue="{!contact.name}">{!contact.name}</apex:selectOption>




Is there a way to create one checkbox in a column. If I put the the selectRadio tags out of the column tags nothing is displayed in the column.


Thanks in advance.

I would like to let you know that I have implemented the checkbox in the manner given below, hope this will give you some idea of it:-

<apex:facet name="header">&nbsp;</apex:facet>
<input type="checkbox" value="{!account.id}" id="{!account.name}" onclick="selectvale(this.value)"/>

How do you retireive the checked account id in controller
Manoj kumar.ax391Manoj kumar.ax391
Hi I am stuck up with a similar problem too. Did you find out how to read these selected checkboxes in the controller?
Yeah mee too .. :( . plz help