1.CheckEdit

 private void repositoryItemCheckEdit1_QueryCheckStateByValue(object sender, DevExpress.XtraEditors.Controls.QueryCheckStateByValueEventArgs e)
        {
            string val = "";
            if (e.Value != null)
            {
                val = e.Value.ToString();
            }
            else
            {
                val = "False";//默认为不选 
            }
            switch (val)
            {
                case "True":
                case "Yes":
                case "1":
                    e.CheckState = CheckState.Checked;
                    break;
                case "False":
                case "No":
                case "0":
                    e.CheckState = CheckState.Unchecked;
                    break;
                default:
                    e.CheckState = CheckState.Checked;
                    break;
            }
            e.Handled = true;
        }

 

2.判断是否选中(上层控件的值来判断)

2.1 Barmanager中

  if(barEditItem3.EditValue!=null)
            MessageBox.Show(barEditItem3.EditValue.ToString());

 

2.2 GridView

this.gridView1.GetRowCellValue(i, "字段")

 

 

 

2. TextEdit(repositoryItemTextEdit1)

sender as DevExpress.XtraEditors.TextEdit

 

相关文章:

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