开发者

table cell vertical scrollbar remains disabled

 开发者_Go百科         TableCell newCell = new TableCell();

            newCell.ID = "Cell" + i.ToString();
            newCell.Style.Add("BORDER", "thin solid");
            **newCell.Style.Add("overflow-x", "scroll");
            newCell.Style.Add("overflow-y", "scroll");**
            newCell.Style.Add("WIDTH", "20px");
            newCell.Style.Add("HEIGHT", "20px");
            newCell.VerticalAlign = VerticalAlign.Top;
            newCell.Controls.AddAt(0, lbl);
            newCell.Controls.AddAt(1, lst);

            tblRow.Cells.Add(newCell);
            tblRow.Style.Add("HEIGHT", "50px");
            tblRow.Height = new Unit(20);

with this code i get the horizontal scroll bar.. however.. the vertical scroll bar remains disabled.. and the listbox control extends till the end of the window..!


wrap this table inside a div, and set overflow to div.

like following:

<div style="height: 326px; overflow: auto;"> [Your table here.] </div>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜