function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SAHG-SFDCSAHG-SFDC 

Inline edit for a field in visualforce page

I m trying to use Inline edit for one field in VF page (This is inline VF page on standard page)

I tried using inlineedit , It does not work

Any suggestions?
<td>
                        <apex:outputText value="{0, date, MM'/'d'/'yyyy}" >
                                                <apex:param value="{!p.ServiceDate}"/>
                        </apex:outputText>
                        </td>

 
karthikeyan perumalkarthikeyan perumal
Hello,

Here  is the sample Code for Accoun inline edit.  how this will help you, 
 
<apex:page standardController="Account" recordSetVar="Account" tabStyle="Account">
    <apex:form >
        <apex:pageBlock title="Edit Account" >
            <apex:pageMessages ></apex:pageMessages>
            <apex:pageBlockButtons >
              <apex:commandButton value="Save" action="{!save}"/>
              <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!Account}" var="Acc">
                <apex:column value="{!Acc.name}"/>
                  <apex:column headerValue="Account Number">
                    <apex:inputField value="{!Acc.AccountNumber}"/>
                  </apex:column>
                  <apex:column headerValue="Phone">
                    <apex:inputField value="{!Acc.Phone}"/>
                  </apex:column>
            </apex:pageBlockTable>
            <apex:panelGrid cellpadding="5" cellspacing="5" columns="5" >
                <apex:commandButton value="|<" action="{!first}"  />
                <apex:commandButton value="<" action="{!previous}" rendered="{!HasPrevious}" />
                <apex:commandButton value=">" action="{!next}" rendered="{!HasNext}" />
                <apex:commandButton value=">|" action="{!last}"  />
                <apex:panelGroup >
                    <apex:outputText value="Records/Page"></apex:outputText>&nbsp;&nbsp;
                    <apex:selectList value="{!PageSize}" size="1">
                        <apex:selectOption itemValue="10" itemLabel="10"></apex:selectOption>
                        <apex:selectOption itemValue="15" itemLabel="15"></apex:selectOption>
                        <apex:selectOption itemValue="20" itemLabel="20"></apex:selectOption>
                    </apex:selectList>&nbsp;&nbsp;
                    <apex:commandButton action="{!NULL}" value="Update Page Size"/>
                </apex:panelGroup>
           </apex:panelGrid>
         </apex:pageBlock>
    </apex:form>
</apex:page>

mark best ANSWER if its works for you.

Thanks
karthik


 
brahmaji tammanabrahmaji tammana
Hi,

InlineEditSupport component provides inline editing support to <apex:outputField> and various container components.

The <apex:inlineEditSupport> component can only be a descendant of the following tags:
<apex:dataList>
<apex:dataTable>
<apex:form>
<apex:outputField>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:pageBlockTable>
<apex:repeat>

Mark best answer if it works for you.

Thanks,
Brahma