private void gridView1_ShowingEditor(object sender, CancelEventArgs e) { DataRow row = this.gridView1.GetDataRow(this.gridView1.FocusedRowHandle); if (row != null) { if (row["STATE"].ToString() == "发布")//当STATE字段为发布的时候 { e.Cancel = true;//该行不可编辑 } } }