日期:2014-05-17  浏览次数:20446 次

GridView1_RowDataBound如何改变当前行某单元格值?
C# code
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
               //。。。。。
                GridViewRow row = e.Row;
    Users users_child = row.DataItem as Users;
                users_child.daysCount = count;//重新某单元格值 
             }
}


结果无效呢,何故?谁给个例子啊

------解决方案--------------------
C# code

(e.Row. DataItem as Users). daysCount=count;