473,396 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to set a row to different color when some case

ad
I want to show the background color of a row in a gridview to different
color when the value of a column is greater than 100.
How can I do?
Sep 23 '06 #1
5 1800
PKJ
<a href=http://www.emicrosoftinterview.comeMicrosoftInterview.com is
a guide for technical interview questions, puzzles, hr questions,
interview tips. It has everything you need to prepare for microsoft
interview </a>

Sep 23 '06 #2
PKJ said:
<a href=http://spamURLelidedis
a guide for technical interview questions, puzzles, hr questions,
interview tips. It has everything you need to prepare for microsoft
interview </a>
Let's simplify things. If you have a Microsoft interview arranged, you only
need *one thing* to prepare for it - a phone. Phone them up, say, "Sorry, I
suddenly had a fit of conscience, and I am no longer prepared to work for
the Evil Empire. I would like to cancel my interview."

This will save you a lot of time and hassle later.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 23 '06 #3
hi Ad,
hook up an event like this to your gridview:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType == DataControlRowType.DataRow &&
Int32.Parse(e.Row.Cells[0].Text) 100)
e.Row.BackColor = System.Drawing.Color.Aquamarine;
}

this should do it.
tim

"ad" <fl****@wfes.tcc.edu.twwrote in message
news:e5**************@TK2MSFTNGP05.phx.gbl...
>I want to show the background color of a row in a gridview to different
color when the value of a column is greater than 100.
How can I do?

Sep 23 '06 #4
I agree. Personally, I don't want Microsoft to be hiring people who have to
cram in order to get a job there, because they will be writing the software
I use!

--

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

A watched clock never boils.

"Richard Heathfield" <in*****@invalid.invalidwrote in message
news:P-******************************@bt.com...
PKJ said:
><a href=http://spamURLelidedis
a guide for technical interview questions, puzzles, hr questions,
interview tips. It has everything you need to prepare for microsoft
interview </a>

Let's simplify things. If you have a Microsoft interview arranged, you
only
need *one thing* to prepare for it - a phone. Phone them up, say, "Sorry,
I
suddenly had a fit of conscience, and I am no longer prepared to work for
the Evil Empire. I would like to cancel my interview."

This will save you a lot of time and hassle later.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)

Sep 23 '06 #5
On 22 Sep 2006 20:38:32 -0700, "PKJ" <cr************@gmail.comwrote:
><a href=http://www.emicrosoftinterview.comeMicrosoftInterview.com is
a guide for technical interview questions, puzzles, hr questions,
interview tips. It has everything you need to prepare for microsoft
interview </a>
It looks like you are taking a Microsoft Interview. Would you like me
to:
Tell you not to spam newsgroups
Teach you to write decent English
Both of the above
--
On-line canal route planner: http://www.canalplan.org.uk

(Waterways World site of the month, April 2001)
My Reply-To address *is* valid, though may not remain so for ever.
Sep 23 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
2
by: ajay | last post by:
How to write a single update sql statement to update different set of attributes of a table. In other words what will be the value of indicator variables to ignore updates of some attributes in a...
4
by: manning_news | last post by:
Using SQL2000. How do I format my select statement to choose one out of 24 different tables? Each table is slightly different and I was hoping I could use one select statement and format it...
3
by: Simone | last post by:
Hello!!! Here is the thing. I have had this problem and I want to address it now where in the next and previous button DoCmd.GoToRecord , , acNext - DoCmd.GoToRecord , , acPrevious I wish the...
3
by: Giovanni Bassi | last post by:
Hello Group, I am running an operation in a different thread. There are resources that are released when the thread is done running. This is done at the end of the execution as it raises an...
5
by: ulyses | last post by:
Hi i have got quite strange problem. I wrote programme which shows all runnign processes. This info is get from /proc dir. When a dir that is process dir is found stat file is read and pid, name...
1
by: Shawn | last post by:
As if it won't be clear enough from my code, I'm pretty new to C programming. This code is being compiled with an ANSI-C compatible compiler for a microcontroller. That part, I believe, will be...
24
by: clare at snyder.on.ca | last post by:
I have a SQL query I need to design to select name and email addresses for policies that are due and not renewed in a given time period. The problem is, the database keeps the information for every...
17
by: romixnews | last post by:
Hi, I'm facing the problem of analyzing a memory allocation dynamic and object creation dynamics of a very big C++ application with a goal of optimizing its performance and eventually also...
13
by: anil.rita | last post by:
When the user chooses an AV file to play, based upon the type of file, I want to use the default installed media player to play it. I am wondering if this is a good way - any alternatives,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.