读书人

DataGridView的其它设立

发布时间: 2012-09-15 19:09:28 作者: rapoo

DataGridView的其它设置
1,自动列宽设置

this.GridColor = Color.Green;            this.BackgroundColor = Color.Linen;            this.VirtualMode = true;            this.AllowUserToAddRows = false;            this.AllowUserToDeleteRows = false;            this.AllowUserToOrderColumns = true;            this.AllowUserToResizeColumns = true;            this.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None;            this.ReadOnly = true;            this.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableAlwaysIncludeHeaderText;

读书人网 >编程

热点推荐