IneedaSmoke
Active member
- Joined
- Mar 4, 2008
- Messages
- 26
- Programming Experience
- Beginner
Hey all, still having some trouble with a dgv. I have multiple columns with some being user input and others as output only from other calculations.
I've created a timer where one cell increments on each tick. Unfortunately, when it updates that datatable cell it resets any field in the same row that someone might be adding data.
I was hoping that multithreading this it might take the focus away but i'm guessing :
are row calls. Basically, if i try to have a user put in anything in item 3+, if the user is 'in the process' of adding something, it resets when these two lines are called.
Any suggestions?
TIA
VB.NET:
Private Sub doSomething()
incrementNumber()
dt.Rows(0).Item(0) = testNumber
dt.Rows(0).Item(1) = testNumber * 2
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim t As Thread
t = New Thread(AddressOf doSomething)
t.Start()
If testNumber = 10 Then
'MsgBox("pause")
Me.DataGridView1.Rows(0).Cells(0).Style.BackColor = Color.Red
End If
End Sub
I've created a timer where one cell increments on each tick. Unfortunately, when it updates that datatable cell it resets any field in the same row that someone might be adding data.
I was hoping that multithreading this it might take the focus away but i'm guessing :
VB.NET:
dt.Rows(0).Item(0) = testNumber
dt.Rows(0).Item(1) = testNumber * 2
are row calls. Basically, if i try to have a user put in anything in item 3+, if the user is 'in the process' of adding something, it resets when these two lines are called.
Any suggestions?
TIA