Solved

Unbound Datagridviewcell value does not  or refresh immediately

Posted on 2009-07-13
3
702 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Expert Comment

by:Randy Wilson
ID: 24839037
Attach some code please...
0
 

Author Comment

by:RIAS
ID: 24839202
 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
ID: 24849263
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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

740 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