Remember that ultimately, everything ASP.NET does is to render simple HTML to the clients.
The PreRender event lets you grab that rendered HTML and modify it before it actually goes to
the client...
// iterate through each row of your grid
foreach( DataGridItem dgItem in myGrid.Items )
{
// iterate through each cell of your row
foreach( TableCell tc in dgItem.Cells )
{
// iterate through each control in your cell
foreach( Control ctl in tc.Controls )
{
// check for text here and then replace
// with trimmed...
// strLong.SubString(0,40) + "<br>" +
// strLong.SubString(41,81) + "<br>" ...
}
}
}
"Tap" <an*******@discussions.microsoft.com> wrote in message news:E8**********************************@microsof t.com...
So, There is no way it does automatically by setting DataFormatting string for the column ?
Could you please guide me with some code in the PreRender event ?
Thanks,
Tap