I'm experimenting thia for almost one week. I almost read every post in forum and also other sources. problem is simle. I want to flash a grid cell when value changes. It works them column and row count is small but when grid is in fullscreen form with 20 columns and lets say 100 rows, cells sometimes blink, sometimes not. I noticed that when you decrease blink time it doenst work. when you go up to 150 ms and up it works. this tells me it has something todo with refresh rate or something. same problem exists with other solution approaches in forum.
Can I kindly ask you yo provide a working a flashing cell sample. I really tried to use every event, every suggestion in this forum.... and also its not first time I face the problem. Last year I had again and at the end I gave up and didnt use flashing function in my project. But this time I reaaly need this.
And also I should mention that this is a very common practice nowadays, so radgrid should able to handle that.
best.
' at the form load event..
radGrid1.DataSource = sampleDataTable()
Private Function sampleDataTable() As DataTable
Dim table1 = New DataTable("prices")
table1.Columns.Add("id")
table1.Columns.Add("Symbol")
table1.Columns.Add("BuyPrice")
table1.Columns.Add("MarketPrice")
For i = 1 To 20
table1.Columns.Add("Extra Column " & i)
Next
For i = 1 To 100
table1.Rows.Add(i, "Stock A, "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10", "10")
Next
Return table1
End Function
Private Sub radGrid1_CellValueChanged(sender As Object, e As DataGridViewCellEventArgs) Handles radGrid1.CellValueChanged
radGrid1.Rows(e.RowIndex).Cells(e.ColumnIndex).Style.BackColor = Color.Lime
Dim t1 As Task = Task.Run(Sub()
System.Threading.Thread.Sleep(180)
radGrid1.Rows(e.RowIndex).Cells(e.ColumnIndex).Style.BackColor = oldcolor
End Sub)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
' change some random cells
Dim r As Integer = random.Next(1, 10)
Dim c As Integer = random.Next(1, 6)
radGrid1.Rows(r).Cells(c).Value = Now.ToLongTimeString
End Sub