#region 全选过滤状态*数据 private void gridView1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { int count = efDevGrid1.GetSelectedDataRow().Rows.Count;//当前选中记录 if(count==gridView1.RowCount)//控制全选时才触发 { this.gridView1.CellValueChanged -= new DevExpress.XtraGrid.Views.Base.CellValueChangedEventHandler(this.gridView1_CellValueChanged); for (int i = 0; i < gridView1.RowCount; i++) { if (gridView1.GetRowCellValue(i, "PONO_STATUS").ToString() == "0")//状态* { efDevGrid1.SetSelectedColumnChecked(i, false); } } this.gridView1.CellValueChanged += new DevExpress.XtraGrid.Views.Base.CellValueChangedEventHandler(this.gridView1_CellValueChanged); } } #endregion