You need to sign in to do that
Don't have an account?
ilineEdit mode not working
i have used ilineEdit mode in pageblocktable, but it is not working:
<apex:pageBlock title="test" mode="inlineEdit">
<apex:pageBlockTablevalue="{!addr_list}" var="addr" >
<apex:column headerValue="City">{!addr.City__c}</apex:column>
<apex:column headerValue="State">{!addr.State__c}</apex:column>
</apex:pageBlockTable>
<apex:pageBlockButtons >
<apex:commandButton action="{!edit}" id="editButton" value="Edit" />
<apex:commandButton action="{!save}" id="saveButton" value="Save" />
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
</apex:pageBlockButtons>
</apex:pageblock>
Please suggest.
HI,
You need to add "<apex:inlineeditsupport />" in the apex:colum to add inline edting in PageBlockTable.
You can take reference from the below URL:
http://www.codespokes.com/2012/09/inline-editing-in-pageblocktable.html
Please let me know if u have any problem on same and if this post helps u please throw KUDOS by click on star at left.
But when i just do this:
<apex:page standardController="account" >
<apex:form >
<apex:pageBlock mode="inlineedit">
<apex:outputField value="{!account.name}"/>
</apex:pageBlock>
</apex:form>
</apex:page>
it works here without "<apex:inlineeditsupport />"
Hi,
In this case it inherit the standardController property,But in case of PageBlockTable you need to add "<apex:inlineeditsupport />" for <apex:column>
<apex:inlineEditingSupport> component, which gives inline editing functionality to several container components.
Please let me know if u have any quesry on same and if this post helps u please throw KUDOS by click on star at left.
Thanks for the promt response.
As per the documentation, inlineedit support is only available for these components:
there is no such component like "<apex:inlineEditingSupport"
Hi,
For your information, inline edit cannot be applicable for object's 'Name' field. But other than that field you can do apply inline edit for custom as well as standard field.
There are two ways to do the inline editing. It is shown below,
Try the followin Examples,
VF page:
<apex:page standardController="Contact" extensions="contactController">
<apex:form >
<apex:pageBlock mode="Inlineedit">
<apex:pageBlockButtons >
<apex:commandButton action="{!edit}" id="editButton" value="Edit"/>
<apex:commandButton action="{!save}" id="saveButton" value="Save"/>
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!conts}" var = "c" >
<apex:column headerValue="Name">
<apex:outputField value="{!c.AccountId}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
</apex:column>
<apex:column headerValue="Name">
<apex:outputField value="{!c.phone}"/>
</apex:column>
</apex:pageBlockTable >
</apex:pageBlock>
</apex:form>
</apex:page>
Controller:
public class contactController{
...........
public List<contact> conts{get;set;}
...................
public contactController(Apexpages.Standardcontroller con){
cont = (Contact)con.getrecord();
conts = [SELECT id,name,AccountId,phone from Contact where name =: 'Kamatchi']; //Here use your query
}
.........................
}
Hope so this helps you...!
Please mark this answer a Solution and please give kudos by clicking on the star icon, if you found this answer as helpful.
Hi,
This is sample code for inline edit.
<apex:pageBlock>
<apex:pageBlockSection>
<apex:pageBlockTable value="{!data}" var="d1">
<apex:column>
<apex:facet name="header">Project Amount</apex:facet>
<apex:outputField value="{!d1.Payment_Amount__c}" >
<apex:inlineEditSupport showOnEdit="{!d1.Payment_Amount__c}"/></apex:outputField>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
I have to use inline editing in a page with custom controller. will it have an affect?
Yeah sure, It will not be a problem for you.
You can use inline edit option both by using custom or standard controller.
Hope so this helps you...!
Please mark this answer a Solution and please give kudos by clicking on the star icon, if you found this answer as helpful.