You need to sign in to do that
Don't have an account?
SFDC16
Delete specific record from wrapper class on selected checkbox
I want to delete a specific record (row )from wrapper class on click checkbox. By using a wrapper class I displayed the record on vf page along with a checkbox
When user checked, you can call apex:actionFunction (https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionFunction.htm) and pass the record Id. then you can delete the record inside the apex class.
regards
Sampath
if you found this answer helpful then please mark it as best answer so it can help others.
Thanks
Akshay
when you will click delete record button call the below method.
You have to manipulate you wrapper also here so the deleted records will flush from the list.
Thanks,
Yogesh
You can delete records from id's also.
Better can you share your controller code so i can help you more.
Thanks,
Yogesh
Try this code...
please let me know if you have any problem.
Thanks,
Yogesh
Basically here i am not able to see in your code where you are adding the records in wrapper?
here in above code i only gave you hint that take on variable type ID in your wrapper.
and when you will select the checkboxes you call the deleteRecord method.
The method will check for which record the the checkbox is true and it will add that record id to list for deleteing them.
Thanks,