行绑定事件的字段值

/// <summary>
    /// 行绑定事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void gvXFList_RowDataBound(object sender, GridViewRowEventArgs e)
    {

     //状态判断
            int state = DataHelper.ToInt(DataBinder.Eval(e.Row.DataItem, "DealType_ID"));
            LinkButton lbtnbl = e.Row.FindControl("lbtnBanJie") as LinkButton;
            if (state == 0)
            {
                lbtnbl.Text = "进展中";
                lbtnbl.ForeColor = Color.Blue;
                //e.Row.BackColor = Color.SkyBlue;
            }

}

posted @ 2014-03-21 10:13  开开123  阅读(173)  评论(0编辑  收藏  举报