You need to sign in to do that
Don't have an account?
The Knight
How to arrange the checkboxes in vertical column instead of horizontal alignment.
We are having two Lists of check box groups which are displayed in two pageblocksections> our requirement is to display the two groups in two columns.The code is like this
<apex:pageblockSection title="Rules" columns="0">
<apex:selectCheckboxes value="{!selectedRules}">
<apex:selectOptions value="{!rules}"/><br/>
</apex:selectCheckboxes><br/>
</apex:pageblockSection>
<apex:selectCheckboxes value="{!selectedRules}">
<apex:selectOptions value="{!rules}"/><br/>
</apex:selectCheckboxes><br/>
</apex:pageblockSection>
<apex:pageblockSection title="Agents">
<apex:selectCheckboxes value="{!selectedAgents}">
<apex:selectOptions value="{!agents}"/><br/></p>
</apex:selectCheckboxes><br/></p>
</apex:pageblockSection>
Could any one suggest on how to align these two as two columns in a pageblock?
<apex:selectCheckboxes value="{!selectedAgents}">
<apex:selectOptions value="{!agents}"/><br/></p>
</apex:selectCheckboxes><br/></p>
</apex:pageblockSection>
Could any one suggest on how to align these two as two columns in a pageblock?
Hi,
try <apex:datatable> or <apex:pageBlockTable>
Should do the trick!
Rgrds
Jeroen
If you put them in two different pageBlockSections they are going to be two separate sections and It might be hard to get them into columns. I'm not totally sure what look you're going for.
<apex:selectOptions value="{!rules}"/><br/>
</apex:selectCheckboxes><br/>
and
<apex:selectOptions value="{!agents}"/><br/></p>
</apex:selectCheckboxes><br/></p>
Hi Jill ofcourse the layout attribute helps to display the elements in pageblocksection vertically. I have used one more pageblocksection which would be the parent of the other two pageblocksections. Now the page looks like this.
------------------------------pageblock-------------------------------------------------------------------------
---------------------------------pageblocksection1(parent)---------------------------------------------------
--------pageblocksection11(child1)---------- -----------pageblocksection12(child2)---------------
it may be late... but try the layout attribute in the <apex:SelectCheckBoxes> tag :
<apex:SelectCheckBoxes layout="PageDirection" value={!SelectedCheckBoxes}>
<apex:Selectoptions value={!SelectOptions}/>
</apex:SelectCheckBoxex>
When the layout is set to "PageDirection" the check boxes option will display on below the other, if not set or set to "inLineDirection" they display next to each other.
Regards.
layout="pageDirection" is in only Radio button, select checkbos doesnt have that attribute
Thanks claper