i would like to set GridPanel width, to 100%. My gridpanel is in a table. I know i can only set gridpanel width in fixed pixel. So my question is: how to set width of panel, gr开发者_开发技巧idpanel etc. in percent in ext.net ? Is it possible ? I don't want to "neste" it into a viewport ... Thanks
To set the Width property declaratively to a unit type other than the default of Pixel, you must create a new unit type specific to the unit type you want. For example, to set a control's Width property to a percentage value of 100, you could do the following:
myWebControl.width = Unit.Percentage(100);
i dont think you can specify values in percentages.
however if you set the value to 'auto' i believe it will automatically fill the space:
Width and Height Fixed values measured in pixels (or, device-independent units that are approximately 1/96 inch). You can set these properties to Auto so that child elements will automatically resize depending on the sizing of the parent panel.
from microsoft
精彩评论