<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridAnimate.aspx.cs" Inherits="Animate.GridAnimate" %>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
http://www.w3.org/1999/xhtml">
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridAnimate.aspx.cs" Inherits="Animate.GridAnimate" %>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
http://www.w3.org/1999/xhtml">
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 12, 2013, 12:44 AM EDT
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridAnimate.aspx.cs" Inherits="Animate.GridAnimate" %>
don't forgot to add the reference of jquery.
Raj BandiRank #1,603 · 981 reputationPosted Aug 7, 2013, 4:53 PM EDT
You were trying to access GridView with id GridView1. You have to use ClientID not the ID in JQuery.
Change lines
$('#GridView1 thead').addClass('headerRow');
$('#GridView1 tbody tr').mouseover(function () {
with this code
var gridId = '<%=GridView1.ClientID%>';
$('#'+gridId+' thead').addClass('headerRow');
$('#'+gridId +' tbody tr').mouseover(function () {
or alternatively you can do like this without ClientID
$("table[id*='GridView1'] thead").fi.addClass('headerRow');
$("table[id*='GridView1'] tbody tr").mouseover(function () {
Cheers,
Raj
Vignesh KumarRank #1,579 · 1K reputationPosted Aug 7, 2013, 10:37 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 7, 2013, 11:15 PM EDT
My understanding is that just need to change the style for each row whenever mouseover happen on that row. You can do this simply by using css only.
Add RowStyle-Css="rowOver" for gridview
AutoGenerateColumns="False" CellPadding="4" DataSourceID="SqlDataSource1"
ForeColor="#333333" GridLines="None" Width="300px" RowStyle-CssClass="rowOver">
in css
tr.rowOver:hover
{
cursor: pointer;
}
Regards,
Iftika
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 11, 2013, 11:19 PM EDT
Refer to this link
http://www.aspsnippets.com/Articles/How-to-change-GridView-Row-Color-on-Mouseover-in-ASPNet.aspx
http://www.aspdotnet-suresh.com/2011/02/how-to-highlight-gridview-rows-on.html
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 11, 2013, 11:27 PM EDT
$(document).ready(function () {
var gridId = '<%=GridView1.ClientID%>';
$('#' + gridId + ' thead').addClass('headerRow');
$('#' + gridId + ' tbody tr').mouseover(function () {
$(this).addClass('highlightRow');
}).mouseout(function () {
$(this).removeClass('highlightRow');
}).click(function () {
$(this).toggleClass('selectedRow');
});
});
Regards,
Iftikar
Vignesh KumarRank #1,579 · 1K reputationPosted Aug 11, 2013, 11:40 PM EDT
This is the code I have been using. But no luck.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridAnimate.aspx.cs" Inherits="Animate.GridAnimate" %>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
http://www.w3.org/1999/xhtml">
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 11, 2013, 11:45 PM EDT
Regards,
Iftikar
Vignesh KumarRank #1,579 · 1K reputationPosted Aug 12, 2013, 2:28 AM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 12, 2013, 2:29 AM EDT
Vignesh KumarRank #1,579 · 1K reputationPosted Aug 12, 2013, 3:33 AM EDT
Is it possible to do slide animation using ajax.
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 12, 2013, 3:54 AM EDT
i didn't get you. plz provide more details...
Vignesh KumarRank #1,579 · 1K reputationPosted Aug 12, 2013, 4:24 AM EDT
http://www.dotnetcurry.com/ShowArticle.aspx?ID=219
And also this another one
http://www.dotnetcurry.com/ShowArticle.aspx?ID=287