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
in pageblock table header check box is diable how to disable under checkboxes
Sorry, don't get the problem.
Can you be more detailed please?
// Niklas
Using jQuery you can solve your issue as shown below, here if your header checkbox is disabled then all value checkboxes will be disabled otherwise enabled.
<apex:page>
<apex:includeScript value=”{!$Resource.jquery171min}” />
<apex:pageblock >
<apex:pageBlockTable value=”{!listOfObject }” var=”e”>
<apex:column width="2%">
<apex:facet name="header">
<apex:inputCheckbox id="selectall"/>
</apex:facet>
<apex:inputCheckbox id="checkBoxId" styleClass=”case”/>
</apex:column>
</apex:pageBlockTable>
</apex:pageblock >
<Script>
$(function(){
if($("input:checked")){
$('.case').attr('disabled', true);
}else{
$('.case'). removeAttr ('disabled');
}
});
</Script>
</apex:page>
please mark it solved.
Thanks
MohammadUsman
Sorry, don't get the problem.
Can you be more detailed please?
// Niklas
Using jQuery you can solve your issue as shown below, here if your header checkbox is disabled then all value checkboxes will be disabled otherwise enabled.
<apex:page>
<apex:includeScript value=”{!$Resource.jquery171min}” />
<apex:pageblock >
<apex:pageBlockTable value=”{!listOfObject }” var=”e”>
<apex:column width="2%">
<apex:facet name="header">
<apex:inputCheckbox id="selectall"/>
</apex:facet>
<apex:inputCheckbox id="checkBoxId" styleClass=”case”/>
</apex:column>
</apex:pageBlockTable>
</apex:pageblock >
<Script>
$(function(){
if($("input:checked")){
$('.case').attr('disabled', true);
}else{
$('.case'). removeAttr ('disabled');
}
});
</Script>
</apex:page>
please mark it solved.
Thanks
MohammadUsman