程序员的部落

导航

改变已经绑定的数据Gridview

protected void GvSelect_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.RowState == DataControlRowState.Normal e.Row.RowState DataControlRowState.Alternate)
{
Label test = e.Row.FindControl("Label1") as Label;
if (test.Text.Trim() == "1")
{
test.Text = "已阅读";
}
else {
test.Text = "未阅读";
}
}
} // test.Text = view["status"].ToString();
}

posted on 2009-04-02 10:18  程序员的部落  阅读(132)  评论(0编辑  收藏  举报