You need to sign in to do that
Don't have an account?
abi1.2911902284080376E12
adding a dynamic row to a datatable
Based on a product quantity im displaying product name and price in a datatable. Now at the end of each product list i need a row that should display the sum of the product price. How do i generate this list?
Im using a datatable to display the product name and price. i want to insert the "total" and "overall total" rows dynamically. please suggest how to do this..
Product Name | Total Price |
7 | |
7 | |
7 | |
7 | |
7 | |
Total | 35 |
10 | |
10 | |
10 | |
10 | |
10 | |
total | 50 |
Overall total | 85 |
You can create a wrapper class to generate the values. I'd imagine the class looks like this:
Formatting not included, I'll leave that to you.
All Answers
You can create a wrapper class to generate the values. I'd imagine the class looks like this:
Formatting not included, I'll leave that to you.
Thanks a lot... :smileyhappy: Its working fine...
Hi SFDCFOX,
can we group the same table with respect to product family. The solution is based on Quantity. Can we group under Famiy???
Please let me know.
You certainly could group by product family or any other means. The specific solution I provided was directed at this poster's specific scenario. The point of the post, however, is to illustrate the usage of wrapper classes, which allows you to generate any sort of arbitrary data representation that will ultimately be rendered in Visualforce.