function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Raj88Raj88 

colspan not working in my VF page

I want to create a table in my VF page, shown below. I tried 'colspan' for seperating a column but that was not working. Any other solution will be much appreciated. Thanks in advance.

My VF page:
<apex:page standardcontroller="Opportunity" extensions="opp">
 <apex:form >
 <apex:pageBlock >
  <apex:pageBlockSection >  
  <apex:pageBlockSectionItem >
                        <apex:outputLabel value="Account" />
                        <apex:outputText value="{!accName}" />
  </apex:pageBlockSectionItem> 
  <br/>
  <apex:pageBlockSectionItem >
                        <apex:outputLabel value="Opportunity" />
                        <apex:outputText value="{!optyName}" />
  </apex:pageBlockSectionItem>
  <br/>
  <apex:pageBlockSectionItem >
                        <apex:outputLabel value="Owner" />
                        <apex:outputText value="{!userName}" />
  </apex:pageBlockSectionItem>
  </apex:pageBlockSection>   
<br/>
<apex:dataTable value="{!oppgap}" var="opp" cellPadding="6" border="1" rows="3" columns="5">
<apex:column >
        <apex:facet name="header"></apex:facet>
</apex:column>
<apex:column >
        <apex:facet name="header">T1</apex:facet>
        <apex:outputLabel value="T1.1"/>
</apex:column>
<apex:column colspan="2">
        <apex:facet name="header">T2</apex:facet>
        <apex:outputText>T2.1</apex:outputText>
        <apex:outputText>T2.2</apex:outputText>
</apex:column>
<apex:column colspan="3">
        <apex:facet name="header">T3</apex:facet>
         <apex:outputText>T3.1</apex:outputText>
        <apex:outputText>T3.2</apex:outputText>
       <apex:outputText>T3.3</apex:outputText>
</apex:column>
</apex:dataTable>                 
</apex:pageBlock>
</apex:form>
</apex:page>

User-added image
Best Answer chosen by Raj88
NagaNaga (Salesforce Developers) 
Hi Raj,

Please follow the below sample code in the link, it shoulf help you

http://salesforce.stackexchange.com/questions/68572/create-a-table-in-visual-force-with-years

Best Regards
Naga Kiran