0
点赞
收藏
分享

微信扫一扫

DataGridView 给每行加上鼠标文本

蛇发女妖 2022-07-12 阅读 188


 

  protected void gvUser_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {  
   e.Row.ToolTip += "登录名:" + DataBinder.Eval(e.Row.DataItem, "UserName").ToString() + "/r/n";
   e.Row.ToolTip += "Email:" + DataBinder.Eval(e.Row.DataItem, "Email") + "/r/n";
   e.Row.ToolTip += "级别:"+ new UserLevel(int.Parse(DataBinder.Eval(e.Row.DataItem,"LevelID").ToString())).LevelName+"/r/n";
        }
    }

举报

相关推荐

0 条评论