Hi, guys :)
Sorry for not very clear question title, but maybe image will help to describe my ploblem:
I want small child panels in parent panel to be autosizeable. Here is my markup and codebehind:
protected void Page_Load(object sender, EventArgs e)
{
var bkg = new[] { "background-color: wheat;", "background-color: gray;", "background-color: #AAAAAA;" };
var random = new Random();
for (var i = 0; i < 285; i++)
{
var panel = new Panel
{
Header = false,
Width = 60,
Height = 30,
BodyStyle = bkg[random.Next(0, 3)],
Frame = false,
StyleSpec = "padding-top: 1px; padding-left: 1px;",
ID = "panel_" + i,
Html = string.Format("<span class='x-unselectable'>{0}</span>", i)
};
var cell = new Cell();
cell.Items.Add(panel);
TableLayout1.Cells.Add(cell);
}
}
<ext:Panel ID="pnlWorkArea" runat="server" Title="Test">
<Body>
<ext:TableLayout ID="TableLayout1" runat="server" Columns="15">
</ext:TableLayout>
</Body>
</ext:Panel>