本文介绍了如何在roedatabound事件中找到gridview id的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨。我想在RowDataBoundevent.how中找到gridview Id我能找到请告诉我任何人紧急
hi .i want to find the gridview Id in RowDataBoundevent.how can i find please tell me anyone urgent
推荐答案
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) {
if(e.Row.RowType == DataControlRowType.DataRow)
{
Decimal Price = (decimal)DataBinder.Eval(e.Row.DataItem, "Price");
if(Price<20)
{
e.Row.ForeColor = System.Drawing.Color.Red;
e.Row.BackColor = System.Drawing.Color.Black;
}
}
}
这篇关于如何在roedatabound事件中找到gridview id的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!