I have an interesting issue. When I change the backcolor of the row in the ItemDatabound event, the hover color ends up shorter than than the actual row height.
When the back color gets changed for a row, the hover only covers about 80% of the height of the row.
Any ideas?
protected
void
grvGrid_ItemDataBound(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
try
{
if
(e.Item
is
GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
string
rowIndex = Convert.ToString(((DataTable)grvGrid.DataSource).Rows[e.Item.ItemIndex][
"IDKey"
]);
item.Attributes.Add(
"onclick"
,
"itemSelected('"
+ rowIndex +
"')"
);
foreach
(TableCell cell
in
e.Item.Cells)
{
cell.ToolTip = cell.Text.Replace(
" "
,
""
).Trim();
}
if
(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex][
"StatusCD"
].ToString().Trim().Equals(
"Deleted"
))
{
e.Item.BackColor = System.Drawing.Color.LightPink;
}
if
(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex][
"StatusCD"
].ToString().Trim().Equals(
"Discontinued"
))
{
e.Item.BackColor = System.Drawing.Color.LightGoldenrodYellow;
}
}
}
catch
(Exception ex)
{
Session[
"ErrorMessage"
] = ex.Message;
Response.Redirect(
"ErrorPage.aspx"
);
}
}
When the back color gets changed for a row, the hover only covers about 80% of the height of the row.
Any ideas?