• Shekhar Gadewar 116
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Controller:
public class Traing_Trainingdeal_records_apex {
    public list<trainingWrapperclass> trdList{get;set;}
    public void getTrainings(){
        trdList = new list<trainingWrapperclass> ();
        for(Training_deal__c trd1:[SELECT Name,Deal_Risk_Status__c from Training_deal__c limit 5]){
                trdList.add(new trainingWrapperclass(trd1));
            } 
    }
    public class trainingWrapperclass{
        public Training_deal__c trd1{get;set;}
        public trainingWrapperclass(Training_deal__c trd1){
            this.trd1=trd1;            
        }
    }
}

VF page:
<apex:page controller="Traing_Trainingdeal_records_apex" showHeader="true">
    <apex:form >
        <apex:pageBlock title="Traning deal details">
            <apex:pageBlockSection title="Traing deal records" showHeader="true">
                <apex:pageBlockTable value="{!trdList}" var="trd" title="All Training deal records">
                    <apex:column value="{!trd.trd1.Name}" />
                </apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>