文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>GridView中RowDataBound绑定事件

GridView中RowDataBound绑定事件

时间:2010-10-27  来源:裴鹏

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  Width="100%" OnRowDataBound="GridView1_RowDataBound">

 

aspx.cs:

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{

 if (e.Row.RowType == DataControlRowType.DataRow)
  {
            if (e.Row.Cells[2].Text == "1")
            {
                e.Row.Cells[2].Text = "男";
            }
            else if (e.Row.Cells[2].Text == "2")
            {
                e.Row.Cells[2].Text = "女";
            }

  }

}

相关阅读 更多 +
排行榜 更多 +
西安交大通

西安交大通

生活实用 下载
长江云通

长江云通

生活实用 下载
translatez

translatez

生活实用 下载