定GRIDVIEW的宽高

来源:互联网 发布:淘宝网高音板胡 编辑:程序博客网 时间:2024/05/20 02:29
for (int i = 0; i < e.Row.Cells.Count; i++)
        {
            e.Row.Cells[i].Attributes.Add("style", "white-space: nowrap;");
            e.Row.Height = Unit.Pixel(10);
            e.Row.Width = Unit.Pixel(5);
        }