Just add an attribute to a particular column in the GridView and set the style "
word-break:break-all;word-wrap:break-word
" and at
RowCreated event of GridView we set the Width of the column that we need to wrap.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Attributes.Add("style", "word-break:break-all;word-wrap:break-word");
}
}
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
this.GridView1.Columns[0].ItemStyle.Width = new Unit(100);
}
Good luck,
OI