devpress grid表格自适应列宽的问题

 1  /// <summary>
 2         /// 自适应列宽,显示横向滚轴,只有当所有列都已经在界面上加载完成之后才能生效
 3         /// </summary>
 4         public void setAutoCloumnWidth()
 5         {
 6             //自适应列宽
 7             this.gridView.BestFitColumns();
 8             this.gridView.HorzScrollVisibility = DevExpress.XtraGrid.Views.Base.ScrollVisibility.Always;
 9             this.gridView.OptionsView.ColumnAutoWidth = false;
10         }

 

posted @ 2016-06-17 10:36  风谷逍遥客  阅读(834)  评论(0编辑  收藏  举报