This question is locked. New answers and comments are not allowed.
Hi,
I have this grid with ID="cName", and this jQuery. When I mouseover the CompanyName cells of the Grid rows, the mouseover jQuery only picks up the First row. Nothing happens when i mousover the other rows ? I cannot figure out how to grab the correct row on mouseover.
Thanks for any help on this
I have this grid with ID="cName", and this jQuery. When I mouseover the CompanyName cells of the Grid rows, the mouseover jQuery only picks up the First row. Nothing happens when i mousover the other rows ? I cannot figure out how to grab the correct row on mouseover.
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<BCAnalytics.Models.CompanyVM>>" %> |
<%if (false) |
{%> |
<script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script> |
<% }%> |
<script type="text/javascript"> |
/*MOUSE OVER */ |
$("#cName").mouseover(function(e) { |
alert("innera " + $("#cName").attr("innerHTML")); |
}); |
$("#cName").mouseleave(function(e) { |
alert("leaving " + $("#cName").attr("innerHTML")); |
}); |
</script> |
<style type="text/css"> |
/*with the ":hover" ( ".?:? {}" is called a pseudo-class), |
the text turns blue on hover. |
without the ":hover" (".ihover" a regular class) , the text just shows up in the |
grid as blue for cCompanyName */ |
.ihover:hover |
{ |
color:Blue; |
} |
</style> |
<h3><%= Html.ActionLink((String)Resources.BCAResources.stdClose, "Index", "Work", new { workindex = 0 }, null)%> |
<br /> |
<i style="color:Red;"><%=Session["iqResult"]%> </i> </h3> |
<%= Html.Telerik().Grid(Model) |
.Name("CompanyGrid") |
.Columns(columns => |
{ |
columns.Add(o => o.cCompanyName).Width(185).Title((string)Resources.BCAResources.coxCompany) |
.HtmlAttributes(new{@class="ihover", id="cName"}); |
columns.Add(o => o.cPhone).Title((string)Resources.BCAResources.stdPhone).Width(75); |
columns.Add(o => o.cGroupCode).Title((string)Resources.BCAResources.coxGroupCode).Width(100); |
columns.Add(o => o.cEmail).Format(Html.Mailto("{0}", "{0}")).Encoded(false).Width(150); |
columns.Add(o => o.cDateUpdated).Format("{0:MM/dd/yyyy}").Width(85).Title((string)Resources.BCAResources.stdUpdated); |
columns.Add(o => o.cCompanyNo).Format(Html.ActionLink((String)Resources.BCAResources.stdEdit, "Index", "Work", new { workindex = 2, OtherParms = "{0}" }, null).ToString()).Encoded(false).Title("").Width(32).Filterable(false); |
columns.Add(o => o.cCompanyNo).Format(Html.ActionLink((String)Resources.BCAResources.stdDelete, "CompanyDelete", new { Id = "{0}" }, null).ToString()).Encoded(false).Title("").Width(50).Filterable(false); |
}) |
.Selectable() |
.DataBinding(dataBinding => dataBinding. |
Ajax().Select("_AjaxBindingCompany", "Company")) |
.Pageable() |
.Sortable(sort => sort.SortMode(GridSortMode.MultipleColumn)) |
.Scrollable(scrolling => scrolling.Height(253)) |
.Filterable()%> |
<p><%= Html.ActionLink((String)Resources.BCAResources.coxCreateNewCompany, "Index", "Work", new { workindex = 2, OtherParms = "Create" }, null)%></p> |