I want to send the data that i just entered into a cell to an If-statemens to perform certain functions.

I an using the following code just for testing purposes:

1 Code:
  1. Private Sub DGVReceipt_CellLeave(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGVReceipt.CellLeave
  2.         Dim row, cell As Integer
  3.         row = e.RowIndex
  4.         cell = e.ColumnIndex
  5.  
  6.         Dim a As String
  7.         a = DGVReceipt.Item(cell, row).Value
  8.     End Sub

Now I find that the value I entered into the cell doesn't display. Only when i go back to the cell and leave it again will it display.

How can I get the value to display immediately?