Devexpress GridView EditGridInplace编辑模式下 根据条件设置 可编辑列 readonly

private void GridView1_EditFormPrepared(object sender, DevExpress.XtraGrid.Views.Grid.EditFormPreparedEventArgs e)
        {            
                (e.BindableControls["YourReadOnlyField"] as BaseEdit).ReadOnly = e.RowHandle != GridControl.NewItemRowHandle;
        }

你可能感兴趣的:(C#,Winform,C#DevExpress,C#,界面)