Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > blink gridviewrow in vb.net
 

blink gridviewrow in vb.net

hi,
how can i blink a row of datagridview with different colors in vb.net?
knowledge glows
  • Moved byeryangMSFTMonday, October 05, 2009 8:03 AM (From:.NET Base Class Library)
  •  
karthickeyan  Wednesday, September 30, 2009 9:35 AM
Add a timer control and change the color after every 100 msec or more

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If DataGridView1.Columns(0).DefaultCellStyle.BackColor = Color.Aqua Then
            DataGridView1.Columns(0).DefaultCellStyle.BackColor = Color.White
        Else
            DataGridView1.Columns(0).DefaultCellStyle.BackColor = Color.Aqua
        End If
    End Sub

Gaurav Khanna
Khanna Gaurav  Wednesday, September 30, 2009 1:22 PM

Oh, you want code for Row. So use following code

  Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If DataGridView1.CurrentRow.DefaultCellStyle.BackColor = Color.Aqua Then
            DataGridView1.CurrentRow.DefaultCellStyle.BackColor = Color.White
        Else
            DataGridView1.CurrentRow.DefaultCellStyle.BackColor = Color.Aqua
        End If
    End Sub

Gaurav Khanna
Khanna Gaurav  Wednesday, September 30, 2009 1:26 PM
do you want to blink a row in ASP.NET web application or a desktop application

for ASP.NET web application you need to use javascript and for desktop application System.Timers.Timer Elasped event will be implemented

Thanks
Khayyam.Sikander  Wednesday, September 30, 2009 9:31 PM
Add a timer control and change the color after every 100 msec or more

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If DataGridView1.Columns(0).DefaultCellStyle.BackColor = Color.Aqua Then
            DataGridView1.Columns(0).DefaultCellStyle.BackColor = Color.White
        Else
            DataGridView1.Columns(0).DefaultCellStyle.BackColor = Color.Aqua
        End If
    End Sub

Gaurav Khanna
Khanna Gaurav  Wednesday, September 30, 2009 1:22 PM

Oh, you want code for Row. So use following code

  Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If DataGridView1.CurrentRow.DefaultCellStyle.BackColor = Color.Aqua Then
            DataGridView1.CurrentRow.DefaultCellStyle.BackColor = Color.White
        Else
            DataGridView1.CurrentRow.DefaultCellStyle.BackColor = Color.Aqua
        End If
    End Sub

Gaurav Khanna
Khanna Gaurav  Wednesday, September 30, 2009 1:26 PM
do you want to blink a row in ASP.NET web application or a desktop application

for ASP.NET web application you need to use javascript and for desktop application System.Timers.Timer Elasped event will be implemented

Thanks
Khayyam.Sikander  Wednesday, September 30, 2009 9:31 PM

You can use google to search for other answers

Custom Search

More Threads

• ComboBox Binding and Finding Correct row in list
• Beginner question: dataAdapter.update not working
• radio button in datagridview?
• How to know the cell of the datagridview contains any data or not???
• Bound Combobox with no selection changes it on refresh
• AggregateBindingListView<T>
• Limits on the number of tables or fields in a datasource?
• Permission type error means I cannot bind to my database
• Complex SQL statement..
• Quick Databound Combobox?