You need to sign in to do that
Don't have an account?

issue with visualforce page table?
I create a VF page that has 3 table in it and these three table showing as vertical instead of horizontal.i want to display table in the following format:
Application | ||||
Type | Date | By | To | Comments/Notes |
App rec | ||||
Com App | ||||
App Assing | ||||
App routed |
|
here is my code:
this is screenshot:
You should use "apex:repeat" to generate the desired table.
Problem with <apex:datatable> is that you can can't specify <tr> explicitly in it. It creates <tr> itself you just need to define <apex:column> in case of data <apex:datatable>.
Another problem in your code is that all your 4 <tr> will display same date, by, to etc information because var c to whom you are referring is same.
Thanks Pramod for your reply.Asi am new to salesforce could you please show me that what and where in need to change the code.
can you provide the sample code.
thanks
It should be something like this -
<apex:form>
<table border="1">
<apex:variable var="row" value="1"/>
<apex:repeat value="{!OpportunityProduct__c}" var="c"">
<tr>
<apex:outputText rendered="{!if(VALUE(row)=1, true, false)}">
<td>Application Recieved</td>
</apex:outputText>
<apex:outputText rendered="{!if(VALUE(row)=2, true, false)}">
<td>Complete Application Recieved</td>
</apex:outputText>
<apex:outputText rendered="{!if(VALUE(row)=3, true, false)}">
<td>Application Assigned</td>
</apex:outputText>
<apex:outputText rendered="{!if(VALUE(row)=4, true, false)}">
<td>Application Routed</td>
</apex:outputText>
<td>
<apex:inputField value="{!c.Application_Received_Complete__c}"/>
</td>
<td>
<apex:inputField value="{!c.Application_Received_Complete_By__c}"/>
</td>
<td>
<apex:inputField value="{!c.Application_Received_To__c}"/>
</td>
<td>
<apex:inputField value="{!c.Comments__c}"/>
</td>
</tr>
<apex:variable var="row" value="{!VALUE(row)+1}"/>
</apex:repeat>
</table></apex:form>