GridView.RowDataBound 事件 在 GridView 控件中将数据行绑定到数据时发生。
protected void gvEvents_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lb = (Label)e.Row.FindControl("lblDoR");
if (lb.Text == "True")
{
lb.Text = (string)base.GetGlobalResourceObject("Companys", "lblDoR");
}
else
{
lb.Text = (string)base.GetGlobalResourceObject("Companys", "lblDoR1");
}
}
protected void gvEvents_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lb = (Label)e.Row.FindControl("lblDoR");
if (lb.Text == "True")
{
lb.Text = (string)base.GetGlobalResourceObject("Companys", "lblDoR");
}
else
{
lb.Text = (string)base.GetGlobalResourceObject("Companys", "lblDoR1");
}
}