Skip to main content
improved
Source Link
highfive
  • 6.3k
  • 3
  • 32
  • 58

The way you use the [pageBlockTable]pageBlockTable1][1] is little confusing as I see. You have to add apex:column tag in order to bring the columns of the table. Try below code for the table. This way you can add more columns to your table.

<apex:pageBlockTable id="sampleGrid" value="{!Contact.AccountId}" var="a">
    <apex:column >
        <apex:facet name="header">Account</apex:facet>
        <apex:inputfield label="Account"  value="{!Contact.AccountId}" />
    </apex:column>
</apex:pageBlockTable>

When you use pageBlockTable, the advantage is to bind dynamic values of a list into rows by using the value and var attribute value. Check the documentation linked. This is not being used in the code anyway. Hope you are in a mid of a development. [1]: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageBlockTable.htm

The way you use the [pageBlockTable]1 is little confusing as I see. You have to add apex:column tag in order to bring the columns of the table. Try below code for the table. This way you can add more columns to your table.

<apex:pageBlockTable id="sampleGrid" value="{!Contact.AccountId}" var="a">
    <apex:column >
        <apex:facet name="header">Account</apex:facet>
        <apex:inputfield label="Account"  value="{!Contact.AccountId}" />
    </apex:column>
</apex:pageBlockTable>

The way you use the [pageBlockTable][1] is little confusing as I see. You have to add apex:column tag in order to bring the columns of the table. Try below code for the table. This way you can add more columns to your table.

<apex:pageBlockTable id="sampleGrid" value="{!Contact.AccountId}" var="a">
    <apex:column >
        <apex:facet name="header">Account</apex:facet>
        <apex:inputfield label="Account"  value="{!Contact.AccountId}" />
    </apex:column>
</apex:pageBlockTable>

When you use pageBlockTable, the advantage is to bind dynamic values of a list into rows by using the value and var attribute value. Check the documentation linked. This is not being used in the code anyway. Hope you are in a mid of a development. [1]: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageBlockTable.htm

improved
Source Link
highfive
  • 6.3k
  • 3
  • 32
  • 58

The way you use the [[pageBlockTable][1]pageBlockTable]1 is little confusing as I see. You have to add apex:column tag in order to bring the columns of the table. Try below code for the table. This way you can add more columns to your table.

<apex:pageBlockTable id="sampleGrid" value="{!Contact.AccountId}" var="a">
    <apex:column >
        <apex:facet name="header">Account</apex:facet>
        <apex:inputfield label="Account"  value="{!Contact.AccountId}" />
    </apex:column>
</apex:pageBlockTable>

The way you use the [pageBlockTable][1] is little confusing as I see. You have to add apex:column tag in order to bring the columns of the table. Try below code for the table. This way you can add more columns to your table.

<apex:pageBlockTable id="sampleGrid" value="{!Contact.AccountId}" var="a">
    <apex:column >
        <apex:facet name="header">Account</apex:facet>
        <apex:inputfield label="Account"  value="{!Contact.AccountId}" />
    </apex:column>
</apex:pageBlockTable>

The way you use the [pageBlockTable]1 is little confusing as I see. You have to add apex:column tag in order to bring the columns of the table. Try below code for the table. This way you can add more columns to your table.

<apex:pageBlockTable id="sampleGrid" value="{!Contact.AccountId}" var="a">
    <apex:column >
        <apex:facet name="header">Account</apex:facet>
        <apex:inputfield label="Account"  value="{!Contact.AccountId}" />
    </apex:column>
</apex:pageBlockTable>
Source Link
highfive
  • 6.3k
  • 3
  • 32
  • 58

The way you use the [pageBlockTable][1] is little confusing as I see. You have to add apex:column tag in order to bring the columns of the table. Try below code for the table. This way you can add more columns to your table.

<apex:pageBlockTable id="sampleGrid" value="{!Contact.AccountId}" var="a">
    <apex:column >
        <apex:facet name="header">Account</apex:facet>
        <apex:inputfield label="Account"  value="{!Contact.AccountId}" />
    </apex:column>
</apex:pageBlockTable>