You need to sign in to do that
Don't have an account?

How to add row in pageblocktable?
Hi guys i was wondering how to add rows in a pageblock table. for example you want to make a to-do list. each row is a task. The columns of the table are task(DropDown list), Deadline(Date), Hours worked(Double). If you want to add a task you click on the Add Row button and adds a row to the table.
Hi I think you can do it easily be maintining a list of objects you need to display on pb table of the controller of vf page
On your button click just add the new object to the list you iterate in pb table and rerender the pageblock that page block contains
hope this will help
thanks for the help but there is a little problem. When the pageblock rerenders all the values of the first column(SelectOptios) are reset to the default values. Is there a way i can overcome this?
From what I get you should display the field the value of select options list get assigned rather than the selectoption list ,if you can put the code of pb table I may be able to help more
ok here is the code
On your add row method make sure you assign the selected value to get getworkitems list
Im not sure what you mean. can u give me an example