DataGridView CellFormatting 事件

设置列的单元格格式

private void dgvTableInfo_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
    if (dgvTableInfo.Columns[e.ColumnIndex].Name == "ColIdel")
    {
        e.Value = Convert.ToBoolean(e.Value) ? "√" : "×";
    }
}

 

posted @ 2026-11-05 23:27  市丸银  阅读(7)  评论(0)    收藏  举报