全选时控制某些状态不可选中

 #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

 

上一篇:Django后端开发学习笔记(3)URL调度器


下一篇:nunjucks基础1(晓舟报告笔记)