获取采用:  cmd2.Parameters.AddWithValue("@xh", e.GetValue("学号").ToString().Trim());

设置:   e.Row.Cells[7].Text = obj.ToString();

 

改变颜色采用style_的方法

//r.Cells[8].ForeColor = Color.Green;
                    r.Cells[8].Style.Add("color", "Green");

posted on 2018-10-30 08:53  qqhfeng16  阅读(404)  评论(0编辑  收藏  举报