I have a link button which is a template field of my gridview. I need to set different text as tooltip of linkbutton in each row.My code not working,
protected void Grid_course_RowDataBound(object sender, GridViewRowEventArgs e)
{
connect con = new connect(date);
if (e.Row.RowType == DataControlRowType.DataRow )
{
LinkButton l = (LinkButton)e.Row.Cells[0].FindControl("Course_Name");
IList<connect.Course> a = con.getCourse(l.Text);
var result = string.Join(",", a[0].Course_Description__c);
l.ToolTip = result.ToString();
}
}
It works only for first row.