• sfdcElephant
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

Hai,

 

 I have tried he following scenario,With the help of my friend Shrama(forceschool.blogspot.com),i blogged this example to help more to community friends,please follow the blog,

 

            http://flexandsalesforce.blogspot.com/2011/06/adding-columns-to-pageblocktable.html

 

Thank u

Haribabu

Force.com Certified Developer

Flexandsalesforce.blogspot.com

Hai friends,

 

   I am trying to add columns to data table dynamically,but i am not getting my requirement please help me for this scenario,

 

  Scenario:-  We need to display all required fields in datatable on page load,after that we need o take input from page,as how many number of columns should add,here if u entered 5 ,then 5 columns should add on button click to datatable,then after if u enetered 5 then from remaining list of fields 5 fields should added to datatable as columns.

 

Please help me

 

Thanks in Advance

sfdc Elephant

How to get a rendered value in dynamic list?

Hai friends,

 

       Can you any body help me to add Columns to Datatable on Vfpage Dynamically.I have to display all records in Data table on vfpage. we can add rows dynamically to datatable,but i need to add columns to datatable.Please help me in this scenario.

 

Thank u,

Haribabu

Based on the Dynamic Editing visualforce example, I am needing todisplay one of two fields depending on the picklist value. The field is "Create a New Account?" If the answer is yes, the Account Name text field will appear. If the answer is no, Account Name Lookup field will appear. Currently, here is my code for the specific section of the page:

 

apex:pageBlockSection title="Required Account Information" id="thePageBlock" columns="1">
            <apex:pageMessages />

            <apex:actionRegion >
                <apex:pageBlockSection columns="1">
                   
                    <apex:pageBlockSectionItem >
                      <apex:outputLabel value="Create A New Account?"/>
                        <apex:outputPanel >
                            <apex:inputField value="{!Account.Create_A_New_Account__c}" required="true">
                                <apex:actionSupport event="onchange" rerender="thePageBlock"
                                                    status="status"/>
                            </apex:inputField>
                            <apex:actionStatus startText="applying value..." id="status"/>
                        </apex:outputPanel>
                    </apex:pageBlockSectionItem>
                </apex:pageBlockSection>
            </apex:actionRegion>
            <apex:pageBlockSection columns="1"
                                   rendered="{!Account.Create_A_New_Account__c == 'Yes'}">
               <apex:inputField value="{!Account.Name}"/>
            </apex:pageBlockSection>

                <apex:inputField value="{!Opportunity.AccountID}"/>
          
            </apex:pageBlockSection>

 

Also, how do I customize the controller to create or retrieve the account?

 

Here is that code:

 

    public Account getAccount() {
        if(account == null) account = new Account();
        return account;