Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Dynamic Table Column Sizing based on Dataset Row Data
Migrateduser
<p>Hi,</p><p> </p><p>I would like to dynamically resize each column width in a table based on the data in the bound dataset (thus I don't know the width until I can access that data in the dataset). Each table will only have 1 row (linked to an outer table element), but I have been unable to dynamically resize the table column width. As far as I can tell, I am encountering a lifecycle issue. It appears that the table column width is set in the onCreate and can't be modified and that the dataset row is not available until after this time. So I have been unable to resize the table.</p><p> </p><p>What I am trying to do is have 4 columns that "total" 100%. Each column is based on a dataset element that has a count. For example</p><p> </p><p>Col A | Col B | Col C | Col D</p><p>
</p><p> 20 | 25 | 30 | 25</p><p> </p><p>So the column A width should be 20 / (20 + 25 + 30 + 25) = 20% (just to make the numbers simple). Column B would be 25%, C = 30% and D = 25%. I am colouring the backgrounds of each column a different colour to graphically illustrate a horizontal "stacked" chart. This is integrated into a larger table and data, thus I can't use a chart here. I almost have it - I have the values displaying, the colours correct, but have been unable to dynamically size the table column width. Anyone have any thoughts?</p><p> </p><p>I also tried adding the 4 data elements into a single column with the display set to Inline, but they don't resize correctly, and I want no whitespace between the elements which I can't seem to achieve so far.</p><p> </p><p>Thanks</p>
Find more posts tagged with
Comments
There are no comments yet