C# 在c中的devexpress gridcontrolrow中查找checkedit控件#

C# 在c中的devexpress gridcontrolrow中查找checkedit控件#,c#,gridcontrol,devexpress-windows-ui,C#,Gridcontrol,Devexpress Windows Ui,我的windows窗体中有devexpress网格控件。我在我的网格中有一个check-edit控件。我需要在运行时从每一行中找到checkedit控件,并根据其他单元格值禁用复选框(如果需要) 请建议 问候和感谢处理ShowingEditor事件以防止编辑单元格 private void gridView1_ShowingEditor(object sender, CancelEventArgs e) { DevExpress.XtraGrid.Views.Grid.GridView

我的windows窗体中有devexpress网格控件。我在我的网格中有一个check-edit控件。我需要在运行时从每一行中找到checkedit控件,并根据其他单元格值禁用复选框(如果需要)

请建议


问候和感谢

处理ShowingEditor事件以防止编辑单元格

private void gridView1_ShowingEditor(object sender, CancelEventArgs e)
{
     DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;

    if (view.FocusedColumn.FieldName == "<name of check field>" && view.GetRowCellValue(view.FocusedRowHandle, "<other field>").ToString()!="editable value"))
           e.Cancel = true;
}
private void gridView1\u显示编辑器(对象发送方,CancelEventArgs e)
{
DevExpress.XtraGrid.Views.Grid.GridView view=发件人为DevExpress.XtraGrid.Views.Grid.GridView;
if(view.FocusedColumn.FieldName==“”&view.GetRowCellValue(view.FocusedRowHandle,“”).ToString()!=“可编辑值”))
e、 取消=真;
}