标签:
this.repositoryItemCheckEdit1.QueryCheckStateByValue += new DevExpress.XtraEditors.Controls.QueryCheckStateByValueEventHandler(re3_QueryCheckStateByValue);
//判断表格的数据勾选复选框
void re3_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":
e.CheckState = CheckState.Checked;
break;
case "1":
e.CheckState = CheckState.Checked;
break;
case "0":
e.CheckState = CheckState.Unchecked;
break;
case "False":
e.CheckState = CheckState.Unchecked;
break;
}
e.Handled = true;
}
标签:
原文地址:http://www.cnblogs.com/houzf/p/5806612.html