protected void cell_DataBinding( object sender, EventArgs e )
{
if ( sender is TableCell )
{
TableCell cell = sender as TableCell;
GridViewRow row = ( sender as TableCell ).Parent as GridViewRow;
if ( row.DataItem != null )
{
string dataValue = row.DataItem.GetPropertyValue( this.DataField ) as string;
string toolTipValue = string.Empty;
if ( !string.IsNullOrWhiteSpace( this.ToolTipDataField ) )
{
toolTipValue = row.DataItem.GetPropertyValue( this.ToolTipDataField ) as string;
}
cell.ToolTip = toolTipValue;
cell.Style[HtmlTextWriterStyle.BackgroundColor] = dataValue;
}
}
}