function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi Mansi,
Use sample below, it will help you to resolve the issue:
Javascript:
---------------
function checkAll(cb) { var inputElem = document.getElementsByTagName("input"); for(var i=0; i<inputElem.length; i++) { if(inputElem[i].id.indexOf("checkedone")!=-1) inputElem[i].checked = cb.checked; } }
apex page:
<apex:dataTable value="{!usersInfo}" var="user" ><apex:column ><apex:facet name="header"> <apex:inputCheckbox > <apex:actionSupport event="onclick" onsubmit="checkAll(this)" /></apex:inputCheckbox> </apex:facet> <apex:inputCheckbox id="checkedone"/></apex:column> <apex:column headerValue="UserName" ><apex:outputText value="{!user.userName}"></apex:outputText> </apex:column></apex:dataTable>
Thanks.
Hi Mansi,
Use sample below, it will help you to resolve the issue:
Javascript:
---------------
function checkAll(cb)
{
var inputElem = document.getElementsByTagName("input");
for(var i=0; i<inputElem.length; i++)
{
if(inputElem[i].id.indexOf("checkedone")!=-1)
inputElem[i].checked = cb.checked;
}
}
apex page:
---------------
<apex:dataTable value="{!usersInfo}" var="user" >
<apex:column >
<apex:facet name="header">
<apex:inputCheckbox >
<apex:actionSupport event="onclick" onsubmit="checkAll(this)" />
</apex:inputCheckbox>
</apex:facet>
<apex:inputCheckbox id="checkedone"/>
</apex:column>
<apex:column headerValue="UserName" >
<apex:outputText value="{!user.userName}"></apex:outputText>
</apex:column>
</apex:dataTable>
Thanks.