修改DataView的行标题问题
天涯海角 2007-08-23 10:40:51 private void dX_CaidDataGridView_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.ColumnIndex == -1 && e.RowIndex != -1)
{
e.Handled = true;
e.PaintBackground(e.CellBounds, false);
ControlPaint.DrawCheckBox(e.Graphics, e.CellBounds, ButtonState.Normal);
}
}
我用上面这段代码将DataGridView的行标题改成了CheckBox,但我怎么获取CheckBox的状态呢?
用DataGridView[-1][i]时报下标不能为负数.