protected void grd_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (((Image)(e.Row.FindControl(“imgButton”))).ImageUrl == “../Images/ML.jpg”)
((Image)(e.Row.FindControl(“imgButton”))).ToolTip = “est”;
if (((Image)(e.Row.FindControl(“imgButton”))).ImageUrl == “../Images/inc.jpg”)
((Image)(e.Row.FindControl(“imgButton”))).ToolTip = “agcd”;
}
second method:
foreach (GridViewRow objDataGridItem in grd.Rows)
{
string[] objarray;
string strToolTip = string.Empty;
if (objDataGridItem.Cells[2].Text.Contains(“:”))
{
strToolTip = objDataGridItem.Cells[2].Text;
objarray = strToolTip.Split(‘:’);
strToolTip = objarray[0].ToString();
objDataGridItem.Cells[2].ToolTip = “rama test by ” + strToolTip;
}
}
////