Home > Code > ASP.NET > Display Tool tip in asp.net grid view control

Display Tool tip in asp.net grid view control

by Thamil   on Oct 31, 2012   Category: ASP.NET   |  Views: 1260    |  Points: 25   |  Gold 



Below sample code used to show the tool tip in the grid view cells

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string ToolTip = "Your ToolTip here";
for (int col = 0; col < e.Row.Cells.Count; col++)
{
e.Row.Cells[col].Attributes.Add("title", ToolTip);
}
}
}




Post Code  |  Code Snippet Home

User Responses


No response found, be the first to review this code snippet.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts