<asp:TemplateColumn>
<ItemTemplate>
<asp:Label
Text='<%# FormatFullName(DataBinder.Eval(Container, "DataItem.FirstName"),_
DataBinder.Eval(Container, "DataItem.LastName")) %>'
 runat="server" ID="Label1">
</asp:Label>
</ItemTemplate>

解决方案 »

  1.   

    http://expert.csdn.net/Expert/topic/1828/1828388.xml?temp=1.836795E-02
      

  2.   

    to net_lover(孟子E章) 
    能不能不用绑定的方法搞出来
    这样就不是动态生成的了
      

  3.   

    你的事Windows程序的话用下面的:
     System.Windows.Forms.DataGridTableStyle dgStyle = new System.Windows.Forms.DataGridTableStyle();
    this.dgTextBoxID = new System.Windows.Forms.DataGridTextBoxColumn();
    this.dgTextBoxName = new  this.dgTextBoxID.FormatInfo = null;
    this.dgTextBoxID.HeaderText = "编号";
    this.dgTextBoxID.MappingName = "Tariff_id";
    this.dgTextBoxID.NullText = "";
    this.dgTextBoxID.ReadOnly = true;
    this.dgTextBoxID.Width = 80;
    this.YourDataGrid.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
      this.dgStyle});
      

  4.   

    写的不错
    可能不能不用ASP.net实现
    只用C#+数据库实现