private void dgvCQ_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            int rowindex = 0;
            int currindex = 0;
            if (e.RowIndex == 0)
            {
                if (e.ColumnIndex == 0)
                {
                    DataGridViewCheckBoxCell cell = dgvCQ.Rows[e.RowIndex].Cells[e.ColumnIndex] as DataGridViewCheckBoxCell;
                    cell.ReadOnly = true;
                    cell.ThreeState = true;   //此行设置属性出错
                }            }
        }
datagrideviewcheckboxthreestate