You need to sign in to do that
Don't have an account?
jucuzoglu
Remove Row Dynamically from a Pageblocktable
My controller has a method that returns a list.
Based on certain criteria I would like to hide the results from the DataBlockTable. For example if Revenue__c < 300.
I know this could be done by changing the SOQL query to filter the results so the list just does not contain the unwanted values. However I would prefer to keep the list as is and filter on the VisualForce side. Is there a syntax to use render within a DataBlockTable so it will conditionally show the rows?
Sure, you can use the rendered attribute to conditionally render rows based on a boolean condition
<apex:outputText value="{!bindVariable}" rendered="{!revenue__c < 300}" />
http://bobbuzzard.blogspot.co.uk/2011/02/visualforce-re-rendering-woes.html
http://boards.developerforce.com/t5/Visualforce-Development/Add-Row-functionality-in-VisualForce/m-p/358921#M42957
Here I am. Keeping the original list as it is, but changing the wrapper class list based on what row is selected. I am using checkboxes to identify which row to add/remove dynamically. You can modify the class to use your conditions.