//winform中是在 cellFormatting中进行处理 web中是在databound中
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex].Name == "uni_flag" && e.Value is Boolean && e.Value != null)
{
if (Convert.ToString(e.Value) == "True")
{
e.Value = "是";
}
else if (Convert.ToString(e.Value) == "False")
{
e.Value = "否";
}
}
}