Test your technical skills online, appear in Virtual Interview and be ready for job!
Twitter Twitter LinkedIn YouTube Google
Be Interview ready ! | Search
Make friends on DotNetFunda.com and expand your network!
Winners

Win Prizes

Announcements
Like us on Facebook
Sponsor
Top Codes Author
Wed, 16-Apr-2014 Authors
All Time Authors
Satyapriyanayak
11600
Jayakumars
8120
Niladri.biswas
6000

Latest members | More ...


(Statistics delayed by 5 minutes)

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

Santosh0683
Posted by Santosh0683 under ASP.NET on 8/22/2010 12:11:36 PM | Points: 40 | Views : 3643 | Status : [Member]

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:



Comments or Responses


Login to post response.

Comments / Responses
Select text & click toolbar to format. Formatting appears in viewmode only. HTML Tags are not allowed.
Bold Italic Underline Paragraph Title Code  Link 
 Wait ... Processing ..... please wait.