定义DataGrid
protected DataGrid myDataGrid;
myDataGrid.ItemCreated += new System.Web.UI.WebControls.DataGridItemEventHandler(this.DataGrid_ItemCreated);
private void DataGrid_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
for(int i = 0; i < e.Item.Cells.Count; i++)
{
e.Item.Cells[i].Wrap = false;
}
}