GridView根据获取的值显示不同内容

在RowDataBand事件里添加如下代码:

(假如GridView第四列为性别列)
if (e.Row.Cells[3].Text=="0")
  e.Row.Cells[3].Text = "男";
else
  e.Row.Cells[3].Text = "女";

posted on 2008-08-14 10:12  kevin.Cheng  阅读(751)  评论(2编辑  收藏  举报