110,571
社区成员
发帖
与我相关
我的任务
分享
private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.ColumnIndex == -1|| e.RowIndex==-1 ||dataGridView1[e.ColumnIndex,e.RowIndex].Value==null) return;
if (e.ColumnIndex == 1 && e.RowIndex>-1)
{
e.PaintBackground(e.CellBounds, false);
e.Graphics.DrawString((bool)dataGridView1[e.ColumnIndex,e.RowIndex].Value?"是":"否" , this.Font, Brushes.Black, new PointF(e.CellBounds.X + 8, e.CellBounds.Y + 8));
e.Handled = true;
}
}
select case when 字段=true then '是' when 字段=false then '否' end as 字段 form table
select case when 字段=true then '是' when 字段=false then '否' form table