BoundColumn col = new BoundColumn();
col.HeaderText = "申请人";
col.DataField = "";??????????如何绑定SELECT查询????????????????
MeetingPlanDG.Columns.Add(col);

解决方案 »

  1.   

    一般要在.aspx文件中写代码的。写入模板列中。
      

  2.   

    http://community.csdn.net/Expert/topic/3354/3354138.xml?temp=5.575198E-02
      

  3.   

    你要先将MeetingPlanDG绑定到数据源,再直接用col.DataField ="数据库里的字段名"
      

  4.   

    SELECT查询生成dataset,
    dataGrid.datasouce = dataset.Tables["Table"].defautView;
    dataGrid.databind();
    BoundColumn col = new BoundColumn();
    col.HeaderText = "申请人";
    col.DataField = ="数据库里的字段名";
    dataGrid.Columns.Add(col);