Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,030 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,589 people online right now. Registration is fast and FREE... Join Now!




Highligt row in datagrid if it has text

 
Reply to this topicStart new topic

Highligt row in datagrid if it has text

quakeworld2007
27 Feb, 2008 - 09:14 AM
Post #1

New D.I.C Head
*

Joined: 28 Sep, 2007
Posts: 44


My Contributions
I have a datargid that I want to highlight if there is text in a row.

Here is my short lived attempt

I do not know how to check and see if a row has text in it.

CODE



  Dim x As Integer = 0
        Dim i As Integer = 1

        While x < DataGridView1.Rows.Count - 1

            While i < DataGridView1.Columns.Count - 1



                Dim c As DataGridViewCell = DataGridView1.Rows(x).Cells(i)


                DataGridView1.Rows(x).DefaultCellStyle.BackColor = Color.Yellow


                x = x + 1

                i = i + 1

            End While


        End While


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 09:34PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month