You need to sign in to do that
Don't have an account?
How to delete a row in visualforce page.
Hi All,
I have one scinario. in that scinario I am making a multiple record editing page. Where user can add, Edit , delete multiple records at a time.
I have some of the fields required in that object. Please have a look of following image for better understading :
https://drive.google.com/file/d/0B-kKCGMuue-fdFpqT19YMDhWbEU/edit?usp=sharing
Problems :
1. suppose user hit on '+' button he will get a new row. But if he want to do undo, by selecting 2nd row and click on '-' sign than also it is asking to enter required field.
2. If i use Immediate or apex:actionregion than selected list is not passing to controller and it showing error please select a row (Which i am thorwing)
Can anyone provide best solution for this type of scinario
---- Lot of thanks for the help ---
Actionregion is the correct way to do this - using immediate=true will discard any user changes.
How are you passing the selected information back to the controller? If you are using a parameter on a command button, you have to use the rerender attribute for it to be sent back to the controller.
I am checking in controller itself , what are the item selected by the user .
When i use ActionRegion around '-' button then i also get the same problem. I got a example of apex:region on web that was working fine. but it is not working in my scinario. Second thing ActionRegion is showing different behaviour with docType="html-5.0" . It shows validation using java script only. Eventhough example which i got on ApexRegion that becomes fails if i use html-5.0 docType.
My question is still the same - how are you passing the parameter to the controller? You need to post the markup that generates the link/button that the user clicks, as that is where the parameter comes from.
Below is the markup which i have used .
Below is My Controller
There's nothing in your commandbutton markup to indicate the row that the user is trying to delete - you'll need to embed an apex:param containing a unique identifier.
I got the point sir, what you want to say. Can you little explain what is the best way to pass rowId / Record Id to Controller which i want to delete. I will be very thankfull if you can give some few line of code. Thanks