1.  设置  

devexpress   gridControl,gridView 点击选中的三种方法

 

千万注意devexpress   gridControl,gridView 点击选中的三种方法

 

 要设置成MouseDown,不然会出现一种情况就是双击选中,让用户体验感极差。

DEV19    

 

2.  设置行选中

 1         #region  gridView选中
 2         private void checkbox_checked(DataTable dt1, DataTable dt2)
 3         {
 4             for (int i = 0; i < dt1.Rows.Count; i++)
 5             {
 6                 string curve_code = dt1.Rows[i]["CURVE_CODE"].ToString().Trim();
 7                 string unit_code = dt1.Rows[i]["UNIT_CODE"].ToString().Trim();
 8                 for (int j = 0; j < dt2.Rows.Count; j++)
 9                 {
10                     string curve_code_dff = dt2.Rows[j]["CURVE_CODE"].ToString().Trim();
11                     string unit_code_dff = dt2.Rows[j]["UNIT_CODE"].ToString().Trim();
12                     if (curve_code == curve_code_dff && unit_code == unit_code_dff)
13                     {
14                         this.gridViewDs.SelectRow(i);
15                     }
16                 }
17             }
18         }
19         #endregion
View Code

相关文章:

  • 2021-09-17
  • 2022-12-23
  • 2021-08-04
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-05
  • 2021-08-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2022-02-04
相关资源
相似解决方案