Monday, February 24, 2014

Wrap text for the particular column of GridView

In order to wrap particular column of GridView of ASP.NET I used following

    protected void GridViewLog_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        e.Row.Cells[7].Attributes.Add("style", "word-break:break-all;word-wrap:normal");
    }

Here column 7 of the GridView gets text wrapped.

No comments: