You need to sign in to do that
Don't have an account?
hide and show using a button
Hi
I have a table display on screen and a button below it.this table data is disabled so no one can make changes.
i want to hide this table when button is pressed and show table when button pressed ..
need to change button name too while it happen...
i did in html and javascript... so anyone can help in visual force pages...
<apex:outputPanel id="summary" >
<apex:pageBlock >
<apex:form >
table shown as summary
</apex:form>
</apex:pageBlock>
</apex:outputPanel>
<apex:form ><apex:commandButton value="Hide Summary" reRender="summary" /></apex:form>
any ideas... appreciated...thank you
You don't need two form tags and I would recommend never using more then one form tag per-visualforce page.
Try this example.
Please keep in mind this is just an example and I didn't test this code. You will want to test this and update it to your own coding standards.
what is listOfRecords .is it the table value ?
Yes it's the list of records you want to display in the table. If you have a static table then you would add an outputPanel to show and hide it.
my problem is it is not table.it is like summary of data. so i need to show orginal values and changed values in summary so i wrote code in
pageblocktable and put these pageblock tables in panelgrid so i can display in two columns in panelgrid ....
may be this is wierd coding....i am new into it...so still learning... any idea you can give to change my design...
thanks for your quick replies...
"my problem is it is not table.it is like summary of data"
I am not sure what you are asking now. Your original issue was you needed a button to hide or show a table in Visualforce, and I showed you how to do that. Now you are asking a "summary of data" question which I have no I ideal what you mean.
Do you still need help with the hide and show part?
Can you get data to show up on the page?
What is the use case you are trying to solve? What do your users want?
i am not able to send you the code as it says only 200000 characters allowed.
this is how the format of code is bye removing apex:column and apex:facet
Thank you