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
Solved

Unbound Datagridviewcell value does not  or refresh immediately

Posted on 2009-07-13
3
701 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: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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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 …

807 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