如题

解决方案 »

  1.   

    DataGrid1.Columns[i].HeaderText = "ABC";
      

  2.   

    帮定的时候也可以改datatable的也可以实现
      

  3.   

    你的DataGrid如果不是自动生成的列,那么可以用这个方法。
    DataGrid1.Columns[i].HeaderText = "ABC";
    并且一定要在DataGrid绑定前运行。如果你的DataGrid是自动生成列的,那么Select语句来控制是比较方便的,如:
    select customer as [abc i need] from tablename where condition='';
      

  4.   

    skytear(铁匠) 回答非常全面了,偶就不重复了
      

  5.   

    我这个看样没法加了
    //ItemDataBound事件
             string up=Convert.ToString(DataBinder.Eval(e.Item.DataItem,"字段名"));
    if(up.Length>3)
    {
          up=up.Substring(0,3)+"...";
    }
    e.Item.Cells[6].Text=up;
    e.Item.Cells[6].ToolTip=up;
      

  6.   

    也可以在ItemDataBound事件中调整:
    if(e.Item.ItemType == ListItemType.Header)
    {
    ........
       e.Item.Cells[6].Text=up;}