Solved

Unbound Datagridviewcell value does not  or refresh immediately

Posted on 2009-07-13
3
697 Views
Last Modified: 2012-05-07
Hi,
I  have an unbound datagridview cell column.The cell value is changed by clicking on contextmenu.The problem is that it does not refresh immediately I need to click outside the cell to actually see  the change.
Any suggestions on refreshing it immediately.

Cheers
0
Comment
Question by:RIAS
3 Comments
 
LVL 7

Expert Comment

by:wrwilson
Comment Utility
Attach some code please...
0
 

Author Comment

by:RIAS
Comment Utility
 Private Sub ContextMenuStrip1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ContextMenuStrip1.MouseClick
        FlgContextmenuClicked = True
        Datagridview2(ColumnCoordinate, RowCoordinate).Value = "No"
    End Sub

Cheers
 
0
 
LVL 20

Accepted Solution

by:
alainbryden earned 500 total points
Comment Utility
After you change the value, try using
DataGridView.InvalidateCell(ColumnCoordinate, RowCoordinate)

This should force the cell to be repainted (and thus the value change to be made apparent)

--
Alain
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now