What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 9077 |  Welcome, Guest!   Register  Login
 Home > Code Snippets > ASP.NET > This example shows how to change grid view row color and set tool tip on ...
Santosh0683

This example shows how to change grid view row color and set tool tip on

 Code Snippet posted by: Santosh0683 | Posted on: 8/22/2010 | Category: ASP.NET Codes | Views: 2919 | Status: [Member] | Points: 40 | Alert Moderator   


protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRow pr = ((DataRowView)e.Row.DataItem).Row;
if (pr["IsActive"].ToString() == "True")
{
e.Row.ForeColor = System.Drawing.Color.Red;
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#f7fff8';");
e.Row.ToolTip = "Your a/c has been denied!";
}
else
{
e.Row.ForeColor = System.Drawing.Color.Blue;
}
}
}

Santosh Singh
http://aspdotnetcode.blogspot.in/
Found interesting? Add this to:


>> Write Response - Respond to this post and get points

More codes snippets

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/26/2013 3:09:57 AM