JavaScript
isn't really required not unless if you want a fancy tooltip. In general, you can simply do something like this at
RowDataBound
event:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
ViewState["OrigData"] = e.Row.Cells[0].Text;
if (e.Row.Cells[0].Text.Length >= 30)
{
e.Row.Cells[0].Text = e.Row.Cells[0].Text.Substring(0, 30) + "...";
e.Row.Cells[0].ToolTip = ViewState["OrigData"].ToString();
}
}
}