|
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 - Marked As Answer byLing WangMSFT, ModeratorTuesday, October 06, 2009 2:20 AM
-
|
| 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 - Marked As Answer byLing WangMSFT, ModeratorTuesday, October 06, 2009 2:20 AM
-
|
| 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 - Marked As Answer byLing WangMSFT, ModeratorTuesday, October 06, 2009 2:20 AM
-
|
| 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 - Marked As Answer byLing WangMSFT, ModeratorTuesday, October 06, 2009 2:20 AM
-
|
| 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 - Marked As Answer byLing WangMSFT, ModeratorTuesday, October 06, 2009 2:20 AM
-
|
| 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 - Marked As Answer byLing WangMSFT, ModeratorTuesday, October 06, 2009 2:20 AM
-
|
| Khayyam.Sikander Wednesday, September 30, 2009 9:31 PM |