DataGrid control processing in the contents of the content
// ...
/ / Define DataGrid
Protected DataGrid MyDataGrid;
// ...
// ...
/ / Respond to the itemcreated event of DataGrid
MyDataGrid.Itemcreated = new system.Web.ui.WebControls.DataGriditeMeventHandler (this.DataGrid_Itemcreated);
// ...
// ...
/ / Respond to the specific method of itemcreated
// This method responds when each line is created
Private void DataGrid_Itemcreated (Object Sender, System.Web.ui.WebControls.DataGriditeMeventargs E)
{// Here, E.Item returns the object of the current creation line
For (int i = 0; i
{// E.Item.cells [x] is the cell in the current line
E.Item.cells [i] .wrap = false;
}
}