0

我有一个查询,列出了嵌套在列出项目的网格视图中的团队成员......

public void GridView3_RowDataBound(object sender, GridViewRowEventArgs e)
    {

      if (e.Row.RowType != DataControlRowType.DataRow) return;

          GridView teamnestedgridview = (GridView)e.Row.FindControl("GridViewNested");
          int projectid = int.Parse(GridView3.DataKeys[e.Row.RowIndex].Value.ToString());



        var qryGetTeam = from emp in db.Employees
                            join etp in db.EmpToProjects on emp.employee_id equals etp.EmployeeID
                            where etp.ProjectID == @projectid
                            select emp.nickname;


                          teamnestedgridview.DataSource = qryGetTeam;
                            teamnestedgridview.DataBind();

当我运行它时,在 gridview 中,员工显示得很好。但是在他们的名字上方,就像一个标题一样,是“项目”这个词......

我试着做

first_name = emp.nickname

在选择中,然后在列表中显示“first_name”而不是“item”一词。知道如何消除那个“标题”吗?

团队形象

4

0 回答 0