473,657 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1813
PKJ
<a href=http://www.emicrosofti nterview.comeMi crosoftIntervie w.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_RowDa taBound(object sender, GridViewRowEven tArgs e)
{
if(e.Row.RowTyp e == DataControlRowT ype.DataRow &&
Int32.Parse(e.R ow.Cells[0].Text) 100)
e.Row.BackColor = System.Drawing. Color.Aquamarin e;
}

this should do it.
tim

"ad" <fl****@wfes.tc c.edu.twwrote in message
news:e5******** ******@TK2MSFTN GP05.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*****@invali d.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.emicrosofti nterview.comeMi crosoftIntervie w.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
7053
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 pragmatic - 3) I usually move forward when I get the gut feeling I am correct - 4) Most likely because of 1), I usually do not manage to fully explain 3) when it comes true. - 5) I have developed for many years (>18) in many different environments,...
2
23689
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 update statement. e.g. EXEC SQL UPDATE vA:iA vB:iB vC:iC in TABLE 1 where vD = ...
4
2362
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 on-the-fly instead of using 24 different ones. I had in mind using a case statement, something like this: select * from case when <input parameter> = 'something1' then tblSomething1 case when <input parameter> = 'something2' then tblSomething2...
3
5712
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 message that displays to the user when there is no more record to got to was something different then **You can't go to the specific record** Has anyone ever changed to say something different?
3
1954
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 event, and then the operation handling this event calls threaded object's dispose method. The problem is: If an exception is thrown the event is never raised, the operation never executes dispose and my resources get stuck on the memory until the app...
5
1760
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 and state are get from it. The thing is that on my machine every time I run it, it gives different results. Sometimes it shows nothing - most of the times. Sometimes it shows info about 4 processes. Sometimes it works correctly. I don't now whats...
1
3266
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 irrelavent. My syntax is surely where I am going wrong. I'd like to be able to call this routine to read different values from another device. This routine would be called quite simply as follows: void main() {
24
19899
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 renewal in the history of the policyholder. The information is in 2 tables, policy and customer, which share the custid data. The polno changes with every renewal Renewals in 2004 would be D, 2005 S, and 2006 L. polexpdates for a given customer...
17
5066
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 identifying memory leaks. The application in question is the Mozilla Web Browser. I also have had similar tasks before in the compiler construction area. And it is easy to come up with many more examples, where such kind of statistics can be very...
13
4869
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, suggestions or improvements? if( wmv file) document.write("<OBJECT id=Player classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 height="354" width="479">
0
8302
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8718
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7314
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.