Subscribe to Subscribers
Talk to Webmaster Tony John

Forums » .NET » ASP.NET »

ALTERNATE TEXT ON MOUSEOVER OF column of gridview


Posted Date: 29 Mar 2012      Posted By:: Komal Khatkole     Member Level: Silver    Member Rank: 989     Points: 4   Responses: 2



hi,

on a particular column of gridview i want to display a alternate text.
so how to do ?

could you suggest me any snippet of code.


********************
i have this one but it requires some assembly cos giving error at Attribute
so which assembly should be added?

protected void gvGridView_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[2].Attribute["mousehover"]= "my text";
}
}

Thanks & Regards,
Komal.




Responses

#664264    Author: Lalji      Member Level: Gold      Member Rank: 131     Date: 30/Mar/2012   Rating: 2 out of 52 out of 5     Points: 3

Hi...

this example just your highlight or get some idea..

public void ItemDataBoundEventHandler1(object
sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover",
"this.style.backgroundColor='Silver'");
e.Row.Attributes.Add("onmouseout",
"this.style.backgroundColor='#FFFBD6'");
}
}



 
#664274    Author: Komal Khatkole      Member Level: Silver      Member Rank: 989     Date: 30/Mar/2012   Rating: 2 out of 52 out of 5     Points: 1

@lalit:-

hi

is this a separate method?
where to call this method?
or any event of grid?
what is it?
i mean how to implement?

Thanks & Regards,
Komal.



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : How to get google search engine result within the same searching site?
Previous : How to enable only a Financial year in Ajax calendar control
Return to Discussion Forum
Post New Message
Category:

Related Messages
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.