Mar 10, 2016 3:31 AM
110 Posts
topic has been resolvedResolved

Width of a table cell to follow width of another table cell

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags: cell,width
  • Replies: 1

In the above custom control, header1 - header5 is in a table. column1 - column5 is in another table within a repeat control.

During runtime, the width of each column will vary since I checked the "No wrap" options of the cell so that the cell/column will resize according to its content.

But how would I compute the width of each header1 - header5 so that it will follow the corresponding column's width?

Using Data Table is an option to avoid the above problem but in the above custom control I also have another 5 boolean properties that will determine whether each header and its corresponding column will be displayed or not.

I've tried using Data Table but it doesn't play well with the 5 boolean properties. When I compute the Data Table Column's visible property to one of the boolean property (let's say it turns out to be false), it will only hide the content but the table cell is still there occupying spaces thus I have to resort to using the above repeat control method.