1   public static void ControlFind(GridControl grid)
 2         {
 3             FindControl fControl = null;
 4             foreach (Control item in grid.Controls)
 5             {
 6                 fControl = item as FindControl;
 7                 if (fControl != null) break;
 8             }
 9             if(fControl != null)
10             {
11                 fControl.FindButton.Image =
12                     global ::YHBJ.Student.LearingAndTest.UI.Properties.Resources.Search;
13                 fControl.ClearButton.Image =
14                     global::YHBJ.Student.LearingAndTest.UI.Properties.Resources.Close_16x16;
15                 fControl.CalcButtonsBestFit();
16             }
17         }

注意调用的时候 要放在Load中. 初始数据加载完成之后.

1  private void ResultInput2_Load(object sender, EventArgs e)
2 {
3             GetGridViewList();
4             this.gridControl1.ForceInitialize();
5             Common.DXControl.ControlFind(this.gridControl1);
6 }

 

相关文章:

  • 2021-09-24
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2022-01-11
  • 2022-12-23
相关资源
相似解决方案