How to make components fill the outer div or td?

When place a canvas based component such as treegrid inline within a div or table td cell, how to make it automatically expand and fill all the space in the outer containing tag?

We don’t support this out of the box in the current release. If you’d like to see this feature in the future, you can put in a request in the Wishlist forum.

Would using Layouts work for you as an alternative to using native HTML and relative positioning?

Thank you for your reply.

No, I tried layout such as layout, vlayout and hlayout. Seems the base canvas class simply doesn’t have the feature.

I think it would be nice as when a smartclient component is in portlet environment where the actual size to render is determined by the outer portlet.

Hi xiaow,

The underlying problem here, which applies to all Ajax and RIA frameworks, is that the browser does not really reveal how much space is available until after the entire table has rendered (which is too late).

A very advanced approach here is to write a placeholder <div> in the portlet layout, then, once the page has loaded, use native DOM access to see how large the <div> was sized, and place the SmartClient-based portlet interface on top of the <div> with matching size.