You need to sign in to do that
Don't have an account?
editing a rocord From page Block Table
Hi All;
I have one custom Object Like Project_ Details__c inthat four fields are there like project Name, client Name,startdate, end date, . now I have crated on visualforce page with foour input text fields and also pageblock Table with the same columns . suppose i create with one record through my vf page , it will be saved into my object , and then entered into page Block table,.
Now What my intension is editing record thrugh PageBlock table, the Page Block Table is Like
AAAA | bbbb | 6/26/2012 | 6/26/2012 | |
Aaaaaaaaaaaa | bbbb | 6/26/2012 | 6/26/2012 | |
Aa | Bb | 6/26/2012 | 6/26/2012 | |
Nagesh Client | nagesh Client | 6/26/2012 | 6/26/2012 |
at the end of the each PageBlock record I I have edit Button
now i click edit button of page block table the record is updated in my custom object and page block Table any body can help
Thanks
In one of your pageblock table columns create command link for edit and the write the following code at the back end
in pgbtable column
<apex:commandlink action="{!edit} value="edit" >edit</apex:commandlink>
in the class
Public pageReference edit(){
pagereference pageref = new pagereference('/editpageid/{acc.Id})'); //acc.id is the current record for update
pageref.setredirect(true);
return pageref;
}
I bet this helps you.
Mr Reddy if this answers your question mark is as solution.
Public pageReference edit(){
pagereference pageref = new pagereference('/editpageid/{acc.Id})'); //acc.id is the current record for update
pageref.setredirect(true);
return pageref;
}
In this Method how to pass selected "acc.Id" or any selected record id to this method form pageBlockTable in visualforce page
i think u can place a edit command button link at each row and when you click it edit it inline or move to the detail page where you can edit the record.