Upon clicking on Delete button please pass the recod id as parameter which you can capture in controller class and perform delete. Please see the below example -
You can use onclick javascript function on commandbutton to open a popup and confirm your delete operation like this:
<apex:commandButton value="Delete" action="{!Delete}" onclick=" return myFunction();/>
//Javascript code here
<script>
function myFunction() {
var val = confirm(" Do you really want to delete these records);
if (val == true)
{
return true;
}
else
{
return false;
}
}
</script>
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards, Deepali Kulshrestha www.kdeepali.com
Please follow the approach as mentioned above.
Thanks,
Srinu
You can use onclick javascript function on commandbutton to open a popup and confirm your delete operation like this: I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com