private void gridView1_ShowingEditor(object sender, CancelEventArgs e)
{
try
{
string filedName = gridView1.FocusedColumn.FieldName;
string SXCSDSJ = Convert.ToString(gridView1.GetFocusedRowCellValue("SXCSDSJ"));
string TMBD = Convert.ToString(gridView1.GetFocusedRowCellValue("TMBD"));
421事件是什么意思if (filedName== "SSXSJ"&& (!string.IsNullOrEmpty(SXCSDSJ) || string.IsNullOrEmpty(TMBD)))
{
e.Cancel = true;
}
}
catch(Exception ex)
{
Log.LogError("控制是否可以编辑单元格报错:", ex);
}
}
满⾜条件的话单元格不可编辑
发布评论