本文介绍了vb .net中的Datagridview和线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在使用线程将值插入datagridview。一个线程插入了一个值,它运行良好。但是datagridview滚动不起作用。
hi all,
i'm inserting values into datagridview by using thread. A thread was inserted a value, it works well. But datagridview scroll is not working.
sub download_1( )
Dim fpcount As String = ""
fpcount = fingertmp(bEnrollNumber.ToString).ToString.Trim
If fpcount <> 0 Then
DV2.Rows.Insert(0, 1)
DV2.Rows(0).Cells(1).Value = bEnrollNumber
If bName.Length = 0 Then
DV2.Rows(0).Cells(2).Value = bEnrollNumber
Else
DV2.Rows(0).Cells(2).Value = bName
End If
DV2.Rows(0).Cells(3).Value = bPassword
If bPrivilege = 0 Then
ad1 = "User"
Else
ad1 = "Admin"
End If
DV2.Rows(0).Cells(4).Value = ad1
DV2.Rows(0).Cells(5).Value = ef
DV2.Rows(0).Cells(6).Value = fpcount
DV2.Rows(0).Cells(7).Value = "0"
DV2.Rows(0).Cells(8).Value = "0"
ctemp = Convert.ToInt32(fpcount) + ctemp
Me.ProgressBar1.Value = (ctemp / finger) * 100
Me.ProgressBar1.Update()
Me.lblprg.Text = ProgressBar1.Value & "%"
lblprg.Refresh()
End If
End sub
代码示例从评论中移除 - Maciej Los
推荐答案
这篇关于vb .net中的Datagridview和线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!