<?xml version="1.0" encoding="UTF-8"?>
<entry>
  <category-id type="integer">1</category-id>
  <content>&lt;p&gt;This is a neat trick to get a tooltip when a user hovers over a row in a gridview. It is very simple and uses standards.&lt;/p&gt;
&lt;p&gt;Simply attach something like this to the GridView's RowDataBound event:&lt;/p&gt;
&lt;pre name="code" class="csharp"&gt;
protected void GridViewEligibleProducts_RowDataBound(object sender, GridViewRowEventArgs e)
{
   if (e.Row.RowType == DataControlRowType.DataRow)
   {
      // get the row view to be able to access data from the binding object
      DataRowView drv = (DataRowView)e.Row.DataItem;
      // lets me type safe, optional
      ProductsSvc.DSProducts.AgencyEligibleProductsRow thisRow = (ProductsSvc.DSProducts.AgencyEligibleProductsRow)drv.Row;
      // this is the magic to get the tooltip. You could put anything as the 2nd parameter
      e.Row.Attributes.Add("title", (thisRow.IsdescriptionNull() ? "" : thisRow.description));
   }
}
&lt;/pre&gt;</content>
  <created-at type="datetime">2009-04-21T11:21:55-07:00</created-at>
  <id type="integer">30</id>
  <title>GridView Row Tooltip hover</title>
  <updated-at type="datetime">2009-04-21T11:27:31-07:00</updated-at>
</entry>
