如何让C#中的绑定字段遇到0值时 显示为空????
如何让C#中的绑定字段遇到0值时 显示为空????
不能修改sql语句 因为后面还有合计行 如果在Sql中 将字段设为空的话 不能统计??
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow || e.Row.RowType == DataControlRowType.Header)
{
//e.Row.Cells[8].
//e.Row.Cells[9].Text = "";这个好像是把header设为空 ,我是想把值设为空 //e.Row.Cells[10].Text = "";
//e.Row.Cells[11].Text = "";
//e.Row.Cells[12].Text = "";
//e.Row.Cells[13].Text = "";
//e.Row.Cells[14].Text = "";
//e.Row.Cells[15].Text = "";
//e.Row.Cells[16].Text = "";
//e.Row.Cells[17].Text = "";
}
}