Wednesday, 7 December 2011

InlineEditing on Visual Force Page


public class testpagecontroller{
public List<account> acclst=new List<account>();
      public List<account> getaccounts(){
      acclst=[select name,industry,type from account];
      return acclst;
public void save1(){

       update acclst;



<apex:page controller="testpagecontroller">
<apex:form >
<apex:pageBlock mode="inlineEdit">
<apex:pageBlockButtons >
<apex:commandbutton value="save" action="{!save1}"/>
<apex:pageBlockTable value="{!accounts}" var="a">
<apex:column Headervalue="Account Name">
<apex:outputfield value="{!}"/>
<apex:column headervalue="Industry">
<apex:outputfield value="{!a.industry}"/>
<apex:column >
<apex:outputfield value="{!a.type}"/>

No comments:

Post a Comment

Get the Developer Name for Record Types without SOQL query

Hi, Previously, the developer name was accessible only via SOQL on the RecordType SObject, and not via describe information. Now you can ...