如何设置DataGridView的行标题
我想问一下如何设置DataGridView行标题,可以把他设成CheckBox或文本,图片等信息
------解决方案--------------------private void dataGridView1_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.Checked);
}
}