TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Chinmaya Dash
NA
1.2k
95.1k
Windows Form Screen frozing while calling Db.
Sep 20 2017 11:49 AM
Hi There,
Windows Form Screen frozing while calling Db in button click to load data in Datagrid.
Taking 5 min of time to load the data in between that screen is frozing.
Some how i have implemented Asyn(Threading) process after that data is loading Data Grid Scroll bars are not working.
Please see my code bellow
Dim mk As MethodInvoker = Sub()
CheckForIllegalCrossThreadCalls = False
m_RollSortableList = New SortableBindingList(Of Global.Clopay.Gsf.Entities.QualityManagementDetailView)(RollDetailModel.GetAllFilteredMaterial(txtItemNumber.Text.Trim, txtMachineName.Text.Trim, txtJobNumber.Text.Trim, txtLotNumber.Text.Trim, reasonCodes, quality, txtLPN.Text.Trim, rolldata, txtLocation.Text.Trim))
m_RollBindingSource.DataSource = m_RollSortableList
dgvRollSets.DataSource = Nothing
dgvRollSets.Columns.Clear()
If Me.InvokeRequired Then
Me.BeginInvoke(New MethodInvoker(AddressOf RefreshDisplay))
Else
RefreshDisplay()
End If
dgvRollSets.DataSource = m_RollBindingSource
End Sub
mk.BeginInvoke(AddressOf callbackfunction, Nothing)
Thanks in advance.
Reply
Answers (
1
)
Copy to Clipboard Functionality
Upload 300MB or above file using Jquery