You need to sign in to do that
Don't have an account?
Supriyo Ghosh 5
Grid panel in vf page
Hi,
I want to add grid in my vf page and also show as landscape mode.Please help.
My vf page
<apex:page id="p1" standardController="Employee_Master__c" extensions="EmpMasterReport" sidebar="false"
renderAs="PDF" showHeader="false">
<apex:form >
<apex:pageBlock title="Employee Master Details" id="Emp_Master">
<apex:pageBlockTable value="{! EmpList }" var="em">
<apex:column value="{!em.Name}"/>
<apex:column value="{!em.Address__c}"/>
<apex:column value="{!em.Date_Of_Birth__c}"/>
<apex:column value="{!em.Date_Of_Joining__c}"/>
<apex:column value="{!em.Date_of_Leaving__c}"/>
<apex:column value="{!em.Thumbnail__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Apex class
public class EmpMasterReport
{
public List<Employee_Master__c> EmpList {get;set;}
public EmpMasterReport(ApexPages.StandardController stdController)
{
EmpList = new List<Employee_Master__c>();
EmpList = [ SELECT Name,Address__c,Date_Of_Birth__c,Date_Of_Joining__c,Date_of_Leaving__c,Thumbnail__c FROM Employee_Master__c where Active__c=true and Photo__c !=null];
}
public EmpMasterReport()
{
EmpList = new List<Employee_Master__c>();
EmpList = [ SELECT Name,Address__c,Date_Of_Birth__c,Date_Of_Joining__c,Date_of_Leaving__c,Thumbnail__c FROM Employee_Master__c where Active__c=true and Photo__c !=null];
}
}
Please help.
I want to add grid in my vf page and also show as landscape mode.Please help.
My vf page
<apex:page id="p1" standardController="Employee_Master__c" extensions="EmpMasterReport" sidebar="false"
renderAs="PDF" showHeader="false">
<apex:form >
<apex:pageBlock title="Employee Master Details" id="Emp_Master">
<apex:pageBlockTable value="{! EmpList }" var="em">
<apex:column value="{!em.Name}"/>
<apex:column value="{!em.Address__c}"/>
<apex:column value="{!em.Date_Of_Birth__c}"/>
<apex:column value="{!em.Date_Of_Joining__c}"/>
<apex:column value="{!em.Date_of_Leaving__c}"/>
<apex:column value="{!em.Thumbnail__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Apex class
public class EmpMasterReport
{
public List<Employee_Master__c> EmpList {get;set;}
public EmpMasterReport(ApexPages.StandardController stdController)
{
EmpList = new List<Employee_Master__c>();
EmpList = [ SELECT Name,Address__c,Date_Of_Birth__c,Date_Of_Joining__c,Date_of_Leaving__c,Thumbnail__c FROM Employee_Master__c where Active__c=true and Photo__c !=null];
}
public EmpMasterReport()
{
EmpList = new List<Employee_Master__c>();
EmpList = [ SELECT Name,Address__c,Date_Of_Birth__c,Date_Of_Joining__c,Date_of_Leaving__c,Thumbnail__c FROM Employee_Master__c where Active__c=true and Photo__c !=null];
}
}
Please help.
Thanks, Sunil.