protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { //格式化 e.Row.Cells[5].Text = String.Format("{0:" + clsCommonParameter.displayFormatString_TowDecimals + "}", Convert.ToDouble(e.Row.Cells[5].Text)); } //int 显示为string if (e.Row.DataItemIndex != -1) { if (e.Row.Cells[8].Text == "0") { e.Row.Cells[8].Text = “未完成"; } else if (e.Row.Cells[8].Text == "1") { e.Row.Cells[8].Text = "通过"; } else { e.Row.Cells[8].Text = "不通过"; } } }