Search
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Codes Author
Tue, 22-Jul-2014 Authors
All Time Authors
Satyapriyanayak
12160
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 : 3855 | 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