gridvie根据内容自动调节列宽:
1 gridView1.OptionsView.ColumnAutoWidth = false; 2 for (int I = 0; I < gridView1.Columns.Count; I++) 3 { 4 this.gridView1.BestFitColumns(); 5 this.gridView1.Columns[I].BestFit();//自动列宽 6 }
2021-10-13 18:55:06
gridvie根据内容自动调节列宽:
1 gridView1.OptionsView.ColumnAutoWidth = false; 2 for (int I = 0; I < gridView1.Columns.Count; I++) 3 { 4 this.gridView1.BestFitColumns(); 5 this.gridView1.Columns[I].BestFit();//自动列宽 6 }