Hi all, I have filled the asp.net datagrid in codebehind file. while binding i have used the datagrid onItemDataBound event to add onmouseover and onmouseout event that looks lik this..
protected void dataGridSavedQueris_OnItemDataBound(Object sender, DataGridItemEventArgs e) {
if (e.Item.ItemType == ListItemType.Item ||
e.Item.ItemType == ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onmouseover", "dgRowHighlightOnWhenMouseOver(this,'" + e.Item.Cells[0].Text.ToString() + "');");
e.Item.Attributes.Add("onmouseout", "dgRowHighlightOffWhenMouseOut (this,'" + e.Item.Cells[0].Text.ToString() + "');");
}
}
now, it renders properly. i mean the dgrowHighlightOnWhenMouseOver and dgRowHighlightOffWhenMouseOut is assigned every row of the datagrid expect the header and footer.
in onmouseover and onmouseout function, I show the div with values of associating id. what happening is whenever i move cursor one cell to another cell on the same row, it fires.
but, i need to fire the both events whenever I mouseover on the row not for cell..
how to do that?
thanks r.e