 |
| VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1).
** Please don't post code questions here **
For issues specific to a particular language in .NET, please see the other forum categories. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

January 9th, 2004, 07:53 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Datagrid row color changing - windows vb.net app
VB.Net question on Windows VB.Net datagrids
How can I loop through the rows/cells of a datagrid and
depending on certain criteria - change the background
color of individual rows/cells within the datagrid ?
Any ideas?
|
|

January 9th, 2004, 12:30 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Do you want to alternate the colors? Otherwise you have to use something like this:
add something like this to your html <div id="display" runat="server"></div>
then in add this for the code behind.
For Each r In objDataSet.Tables(0).Rows
If curmonth <> MonthName(DatePart("m", r("event_date"))) & " " & DatePart("yyyy", r("event_date")) Then
curmonth = MonthName(DatePart("m", r("event_date"))) & " " & DatePart("yyyy", r("event_date"))
'do something
Else
'do something else
End If
Next
You basically want to search through and find a condition and do something once it has been found.
|
|

January 9th, 2004, 01:59 PM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Widows Form or ASP.Net?
It's important for us to explain to our nation that life is important. It's not only life of babies, but it's life of children living in, you know, the dark dungeons of the Internet."â George W. Bush - Arlington Heights, Ill., Oct. 24, 2000
|
|

January 9th, 2004, 03:59 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
My response was for asp.net if i'm whom you're asking.
|
|

January 9th, 2004, 05:14 PM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks stu9820 I new yours was for ASP.Net I was asking badgolfer. He didn't say what type of application. I have written something to do it in Windows Forms.
It's important for us to explain to our nation that life is important. It's not only life of babies, but it's life of children living in, you know, the dark dungeons of the Internet."â George W. Bush - Arlington Heights, Ill., Oct. 24, 2000
|
|

January 12th, 2004, 05:47 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry guys - I should have said I need to change grid row
colors in a VB.Net windows form.
|
|

January 28th, 2005, 01:43 AM
|
|
Registered User
|
|
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi Christopher U have not written how to change the row colors in windows vb.net datagrid depending on a coloumn criteria.
|
|

April 18th, 2007, 02:32 PM
|
|
Registered User
|
|
Join Date: Jan 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I also interested in the answer to this question
|
|
 |