I'm kinda stuck on figuring this out. I'm looking to add dynamic rows containing two drop downs anyone know how i go about doing this?
1 Answer
Here's one way of adding a new row to your <apex:pageBlockTable>
dynamically
Controller
public class YourController {
public List< ... > rows { get; set; }
public void addRow() {
rows.add( ... );
}
}
Visualforce
....
<apex:commandButton value="Add Row" action="{!addRow}" rerender="dynamicTableContainer"/>
...
<apex:outputPanel id="dynamicTableContainer">
<apex:pageBlockTable value="{!rows}" var="row">
...
</apex:pageBlockTable>
</apex:outputPanel>