You need to sign in to do that
Don't have an account?
VN
<apex:column >
<apex:facet name="header"><b> Achieved </b></apex:facet>
<apex:outputText value="{!count}"/>
</apex:column>
<apex:column >
<apex:facet name="header"><b> Sales District</b></apex:facet>
<apex:outputText value="{!accounts.salesdistrict__c}"/>
</apex:column>
Can more than one list of data be passed to datatable?
hi,
I have a reuirement wherein i need to fetch the details from the account and a custom object called Master data. The controller class is
public class visit
{
{
......
public Account[] getAccount()
{
accounts = [Select Name,Customer_Rating__c,salesdistrict__c,RecordTypeId from Account];
return accounts;
}
public Master_Data__c[] getMasterData()
{
for(Account acc:accounts)
{
public Account[] getAccount()
{
accounts = [Select Name,Customer_Rating__c,salesdistrict__c,RecordTypeId from Account];
return accounts;
}
public Master_Data__c[] getMasterData()
{
for(Account acc:accounts)
{
if(acc.RecordTypeId=='some value')
master=[Select Existing_Customers__c from Master_Data__c where Name = 'Existing Customers - CHAA'];
master=[Select Existing_Customers__c from Master_Data__c where Name = 'Existing Customers - CHAA'];
else if()
....
......
}
}
return master;
}
public integer getCount()
{
return count;
}
}
}
public integer getCount()
{
return count;
}
}
The Page code is
<apex:page controller="visit">
<h1><Center>Account Wise Visit Status Report</Center></h1><br><br></br></br>
<apex:pageBlock title="Account">
<apex:pageBlockTable value="{!Account}" var="accounts" cellPadding="4" border="1">
<h1><Center>Account Wise Visit Status Report</Center></h1><br><br></br></br>
<apex:pageBlock title="Account">
<apex:pageBlockTable value="{!Account}" var="accounts" cellPadding="4" border="1">
<apex:column >
<apex:facet name="header"><b> Account Name </b></apex:facet>
<apex:outputText value="{!accounts.Name}"/>
</apex:column>
<apex:facet name="header"><b> Account Name </b></apex:facet>
<apex:outputText value="{!accounts.Name}"/>
</apex:column>
<apex:column >
<apex:facet name="header"><b> Customer Rating </b></apex:facet>
<apex:outputText value="{!accounts.Customer_Rating__c}"/>
</apex:column>
<apex:facet name="header"><b> Customer Rating </b></apex:facet>
<apex:outputText value="{!accounts.Customer_Rating__c}"/>
</apex:column>
<apex:column >
<apex:facet name="header"><b> Achieved </b></apex:facet>
<apex:outputText value="{!count}"/>
</apex:column>
<apex:column >
<apex:facet name="header"><b> Sales District</b></apex:facet>
<apex:outputText value="{!accounts.salesdistrict__c}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
</apex:pageBlock>
</apex:page>
Now i need to access the data stored in the variable called master and display it in the same datatable. Is it possible to do so? if so then how? should i try some other approach?
Please help me here if you have any idea about this.
Thanks in advance
Priya Nair
Also, can you use the "SRC" button in the editor next time? Very hard to read Visualforce markup without proper escaping of the smiley text as you may have noticed.
Thanks,