473,654 Members | 3,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Prevent alternating row colors in Cells

Hi, all!

How does one prevent table cell background colors from alternating between
grey and white? I've dropped a basic table control on an ASP.Net page
(using VB.Net codebehind), and dynamically creating rows and cells. However,
I can't seem to get the blasted thing to stop alternating the background
colors on every other row! I've tried setting the cell.BackColor property,
but the value is just getting ignored! Also tried on row.BackColor, but
that doesn't have any effect either!

What's the deal? This is driving me nuts!!
SteveB
Nov 21 '05 #1
1 1309
Steve,

In your case would I ask this question in the newsgroup,

Aspnet
news://msnews.microsoft.com/microsof...amework.aspnet

Web interface:
http://communities2.microsoft.com/co...amework.aspnet
That is not that you are not welcome here, however it is a specifique answer
which has probably a lot more change on an answer there than in this
newsgroup.

I hope you find your answer soon.

Cor
Nov 21 '05 #2

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

Similar topics

12
2876
by: LRW | last post by:
Is there some way to make a table have alternating colors for rows when you're generating the table data with a WHILE statement? You know, row 1 has a gray BG, row 2 is white, row 3 is gray, 4 is white, etc, for as long as there's data. Here's what I'm using right now: $query_RSwho = "SELECT * FROM tbl_indv ORDER BY name ASC"; $RSwho = @mysql_query($query_RSwho, $connection) or die("Couldn't query: " .. mysql_error()); while...
2
6181
by: Ralph Snart | last post by:
Is there a way to alternate table row colors without using the position() mod 2 trick? I'm in a series of nested xsl:for-each elements, about 3 deep, and I want to alternate the table row color all the way through. position() resets to 1 whenever the inner for-each loops around, of course. Example code: <xsl:for-each select="/games/game) = 1]"> <xsl:sort select="platform"/>
47
18876
by: Matt Kruse | last post by:
http://www.mattkruse.com/temp/css_expressions.html One of the standard CSS questions is "how can I shade every other table row a different color with CSS?" The answers are usually 1) you can't (yet), 2) put a class on every other tr, or 3) use javascript to do the styling for you. Well, I've been playing the CSS expressions quite a bit lately and I've found a much simpler solution which works in IE5.5+, using "expressions". If
6
2242
by: Mark | last post by:
Is there a programatic way to iterate through all the named colors? Something like: HtmlTable ht = new HtmlTable(); HtmlTableRow htr; HtmlTableCell htc; foreach (Color c in ) //I CAN'T FIND COLLECTION OF ALL COLORS { htr = new HtmlTableRow();
9
2686
by: Max Weebler | last post by:
Hi, I have a datagrid built that has an alternating item style that sets the backcolor and ForeColor of its rows. I have 4 template columns. One of them has a LinkButton embedded in it to perform updates. All the styles that are set are being followed by all templated columns with the exception for the update column. The update column does set the BackColor appropriately but when setting its ForeColor the LinkButton's color is blue and...
5
3337
by: | last post by:
I'm making admin forms. I'm wondering if there is a way to have the server programmatically assign alternating colors in a regular table (not a datalist control). I notice ASP.NET 2 offers a runat="server" attribute on tables, leading me to believe that this should be possible. Any ideas? I'm using C#. Thanks, -KF
3
3701
by: Daniel Manes | last post by:
My DataGridView is set up like this: * Main row background color = white * Alternating row background color = light gray I also have a read-only (non-editable) column I want to show up as solid dark gray (i.e., no alternating row colors), but it shows up as alternating dark/light gray. Is there any way to get around this?
3
1563
clintw
by: clintw | last post by:
Hi all, I've been doing my head in trying to get this to work, but I keep running into a snag. Basically I have a database table with a list of events for the year, with fields for Month, Event Description, FullDate (used for sorting). When I input the result set into a HTML table, this works fine, alternating backgrounds colors for the individual rows is no problem - my problem comes in trying to alternate the background colors by Month...
0
8285
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
8814
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8706
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
8475
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
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2709
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1592
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.