在.net中怎么在GridView里删除一条记录
在.net中怎么在GridView里删除一条记录后让那个记录变成禁用或灰色的,不是真正的删除 gridview .net
[解决办法]
删除按键操作SQL update table set isDeleted=1 where id=@id
给GridView添加事件 OnRowDataBound="GvSubscribe_RowDataBound"
protected void GvSubscribe_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
int tempFlowId = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "isDeleted"));
if (tempFlowId == 1)
e.Row.BackColor =System.Drawing.Color.Blue;
else
e.Row.BackColor = System.Drawing.Color.Red;
}
}