1.
repositoryItemCheckEdit1.QueryCheckStateByValue += new DevExpress.XtraEditors.Controls.QueryCheckStateByValueEventHandler(ICE_selectedMark_QueryCheckStateByValue);
2.
/// <summary>
/// 处理 RepositoryItemCheckEdit 类型的选择框多选
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void repositoryItemCheckEdit1_QueryCheckStateByValue(object sender, DevExpress.XtraEditors.Controls.QueryCheckStateByValueEventArgs e)
{
string val = "";
if (e.Value != null)
{
val = e.Value.ToString();
}
else
{
val = "True"; //默认为选中
}
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.Unchecked;
break;
}
e.Handled = true;
}
解决DevExpress的RepositoryItemCheckEdit类型的多选框不能多选问题
最新推荐文章于 2022-11-18 16:32:49 发布