gridView自动列宽代码

gridView1.OptionsView.ColumnAutoWidth = false;

for (int I = 0; I < gridView1.Columns.Count; I++)
{
this.gridView1.BestFitColumns();
this.gridView1.Columns[I].BestFit();//自动列宽
}

 

posted on 2015-10-11 21:07  武胜-阿伟  阅读(1378)  评论(0编辑  收藏  举报