0

Below is the visualforce page i have created i want to display a text on the starting of the row like "Resdential for Sale" which has no header

i want to display a text on the starting of the row like "Resdential for Sale" below is the Visualforce Page code

<apex:page standardController="Development_Project__c">
<apex:form >


            <apex:pageBlockSection columns="1">
               <apex:pageBlockTable value="{!Development_Project__c}" var="dp" columnsWidth="10%,5%,5%,5%,5%,5%,5%">
                   <apex:column>
                         <apex:facet name="header">
                       </apex:facet>
                    </apex:column>

                   <apex:column  headerValue="#Units">
                       <apex:inputfield value="{!Development_Project__c.Residential_for_Sale_Total_Unit_Size__c}"/>
                   </apex:column>
                   <apex:column  headervalue="GSF">
                       <apex:inputField value="{!Development_Project__c.Residential_for_Sale_Total_Gross_sf__c}"/>
                   </apex:column>
                   <apex:column  headervalue="NSF">
                       <apex:inputField value="{!Development_Project__c.Residential_for_Sale_Total_Net_sf__c}"/>
                   </apex:column>
                   <apex:column  headervalue="EFF%" />
                   <apex:column  headervalue="AVG Unit" />
                   <apex:column  headervalue="F to F Height" />


            </apex:pageBlockTable>

        </apex:pageBlockSection>

    </apex:form>
  </apex:page>

i want to create a pageblock table in below format enter image description here

how to create the "Resdential for sale","Resdential for Rent","Hotel","Retail","Office" and "Parking" which are only Labels.

2
  • remove unwanted code which is not relevant to your question Commented Jul 18, 2017 at 15:53
  • @user45226, I am having a similar Requirement. I know this must have resolved, could you please provide me some links or piece of code how I can achieve this Commented Jul 6, 2020 at 13:40

1 Answer 1

0

In this part of your code:

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

You are defining a column without any header or value, so it ends up as a blank row as you see in your attached image. If you want to display something in there, just add an attribute to your tag as in the other columns below, either a header via headerValue="Residential for Sale" or value="Residential for Sale". Example:

                <apex:column value="Residential for Sale">
                     <apex:facet name="header">
                   </apex:facet>
                </apex:column>

If you want some dynamic content, you will need to work with a data structure in your extension and populate it with the desired text.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .